fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `unwrap_unchecked` after PreCodegen 2 3fn unwrap_unchecked(_1: Option<T>) -> T { 4 debug slf => _1; 5 let mut _0: T; 6 scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) { 7 debug self => _1; 8 let mut _2: isize; 9 let mut _3: &std::option::Option<T>; 10 scope 2 { 11 debug val => _0; 12 } 13 scope 3 { 14 scope 5 (inlined unreachable_unchecked) { 15 scope 6 { 16 scope 7 (inlined unreachable_unchecked::runtime) { 17 } 18 } 19 } 20 } 21 scope 4 (inlined Option::<T>::is_some) { 22 debug self => _3; 23 } 24 } 25 26 bb0: { 27 StorageLive(_3); 28 StorageLive(_2); 29 _2 = discriminant(_1); 30 switchInt(move _2) -> [1: bb1, otherwise: bb2]; 31 } 32 33 bb1: { 34 _0 = move ((_1 as Some).0: T); 35 StorageDead(_2); 36 StorageDead(_3); 37 return; 38 } 39 40 bb2: { 41 unreachable; 42 } 43}