rust/tests/mir-opt/building/issue_101867.main.built.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.6 KiB
Rust
Raw Normal View History

// MIR for `main` after built
2022-09-16 11:54:41 +00:00
| User Type Annotations
| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
2022-09-16 11:54:41 +00:00
|
fn main() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] };
let mut _2: !;
let _3: ();
let mut _4: !;
let mut _6: isize;
2022-09-16 11:54:41 +00:00
scope 1 {
2023-06-06 13:47:00 +00:00
debug x => _1;
let _5: u8;
2022-09-16 11:54:41 +00:00
scope 2 {
2023-06-06 13:47:00 +00:00
debug y => _5;
2022-09-16 11:54:41 +00:00
}
}
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
_1 = Option::<u8>::Some(const 1_u8);
FakeRead(ForLet(None), _1);
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
StorageLive(_5);
FakeRead(ForMatchedPlace(None), _1);
_6 = discriminant(_1);
switchInt(move _6) -> [1: bb4, otherwise: bb3];
2022-09-16 11:54:41 +00:00
}
bb1: {
2023-06-06 13:47:00 +00:00
StorageLive(_3);
StorageLive(_4);
_4 = begin_panic::<&str>(const "explicit panic") -> bb7;
2022-09-16 11:54:41 +00:00
}
bb2: {
2023-06-06 13:47:00 +00:00
StorageDead(_4);
StorageDead(_3);
unreachable;
2022-09-16 11:54:41 +00:00
}
bb3: {
2023-06-06 13:47:00 +00:00
goto -> bb6;
2022-09-16 11:54:41 +00:00
}
bb4: {
2023-06-06 13:47:00 +00:00
falseEdge -> [real: bb5, imaginary: bb3];
2022-09-16 11:54:41 +00:00
}
bb5: {
2023-06-06 13:47:00 +00:00
_5 = ((_1 as Some).0: u8);
_0 = const ();
StorageDead(_5);
StorageDead(_1);
return;
2022-09-16 11:54:41 +00:00
}
bb6: {
2023-06-06 13:47:00 +00:00
StorageDead(_5);
goto -> bb1;
2022-09-16 11:54:41 +00:00
}
bb7 (cleanup): {
2023-06-06 13:47:00 +00:00
resume;
2022-09-16 11:54:41 +00:00
}
}