fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `main` after built 2 3| User Type Annotations 4| 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> 5| 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> 6| 7fn main() -> () { 8 let mut _0: (); 9 let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] }; 10 let mut _2: !; 11 let _3: (); 12 let mut _4: !; 13 let mut _6: isize; 14 scope 1 { 15 debug x => _1; 16 let _5: u8; 17 scope 2 { 18 debug y => _5; 19 } 20 } 21 22 bb0: { 23 StorageLive(_1); 24 _1 = Option::<u8>::Some(const 1_u8); 25 FakeRead(ForLet(None), _1); 26 AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); 27 StorageLive(_5); 28 FakeRead(ForMatchedPlace(None), _1); 29 _6 = discriminant(_1); 30 switchInt(move _6) -> [1: bb4, otherwise: bb3]; 31 } 32 33 bb1: { 34 StorageLive(_3); 35 StorageLive(_4); 36 _4 = begin_panic::<&str>(const "explicit panic") -> bb7; 37 } 38 39 bb2: { 40 StorageDead(_4); 41 StorageDead(_3); 42 unreachable; 43 } 44 45 bb3: { 46 goto -> bb6; 47 } 48 49 bb4: { 50 falseEdge -> [real: bb5, imaginary: bb3]; 51 } 52 53 bb5: { 54 _5 = ((_1 as Some).0: u8); 55 _0 = const (); 56 StorageDead(_5); 57 StorageDead(_1); 58 return; 59 } 60 61 bb6: { 62 StorageDead(_5); 63 goto -> bb1; 64 } 65 66 bb7 (cleanup): { 67 resume; 68 } 69}