mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
83 lines
1.8 KiB
Rust
83 lines
1.8 KiB
Rust
// MIR for `main` after built
|
|
|
|
| User Type Annotations
|
|
| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
|
|
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
|
|
|
|
|
fn main() -> () {
|
|
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;
|
|
scope 1 {
|
|
debug x => _1;
|
|
let _5: u8;
|
|
scope 2 {
|
|
debug y => _5;
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1);
|
|
_1 = Option::<u8>::Some(const 1_u8);
|
|
FakeRead(ForLet(None), _1);
|
|
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
|
|
StorageLive(_5);
|
|
PlaceMention(_1);
|
|
_6 = discriminant(_1);
|
|
switchInt(move _6) -> [1: bb6, otherwise: bb4];
|
|
}
|
|
|
|
bb1: {
|
|
StorageLive(_3);
|
|
StorageLive(_4);
|
|
_4 = begin_panic::<&str>(const "explicit panic") -> bb10;
|
|
}
|
|
|
|
bb2: {
|
|
StorageDead(_4);
|
|
StorageDead(_3);
|
|
unreachable;
|
|
}
|
|
|
|
bb3: {
|
|
FakeRead(ForMatchedPlace(None), _1);
|
|
unreachable;
|
|
}
|
|
|
|
bb4: {
|
|
goto -> bb9;
|
|
}
|
|
|
|
bb5: {
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb6: {
|
|
falseEdge -> [real: bb8, imaginary: bb4];
|
|
}
|
|
|
|
bb7: {
|
|
goto -> bb4;
|
|
}
|
|
|
|
bb8: {
|
|
_5 = ((_1 as Some).0: u8);
|
|
_0 = const ();
|
|
StorageDead(_5);
|
|
StorageDead(_1);
|
|
return;
|
|
}
|
|
|
|
bb9: {
|
|
StorageDead(_5);
|
|
goto -> bb1;
|
|
}
|
|
|
|
bb10 (cleanup): {
|
|
resume;
|
|
}
|
|
}
|