fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `num_to_digit` after PreCodegen 2 3fn num_to_digit(_1: char) -> u32 { 4 debug num => _1; 5 let mut _0: u32; 6 let mut _4: std::option::Option<u32>; 7 scope 1 (inlined char::methods::<impl char>::is_digit) { 8 debug self => _1; 9 debug radix => const 8_u32; 10 let _2: std::option::Option<u32>; 11 let mut _7: &std::option::Option<u32>; 12 scope 2 (inlined Option::<u32>::is_some) { 13 debug self => _7; 14 let mut _3: isize; 15 } 16 } 17 scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { 18 debug self => _4; 19 let mut _5: isize; 20 let mut _6: !; 21 scope 4 { 22 debug val => _0; 23 } 24 } 25 26 bb0: { 27 StorageLive(_7); 28 StorageLive(_2); 29 _2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind continue]; 30 } 31 32 bb1: { 33 StorageLive(_3); 34 _3 = discriminant(_2); 35 StorageDead(_7); 36 StorageDead(_2); 37 switchInt(move _3) -> [1: bb2, otherwise: bb7]; 38 } 39 40 bb2: { 41 StorageDead(_3); 42 StorageLive(_4); 43 _4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind continue]; 44 } 45 46 bb3: { 47 StorageLive(_5); 48 _5 = discriminant(_4); 49 switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb6]; 50 } 51 52 bb4: { 53 _6 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value") -> unwind continue; 54 } 55 56 bb5: { 57 _0 = move ((_4 as Some).0: u32); 58 StorageDead(_5); 59 StorageDead(_4); 60 goto -> bb8; 61 } 62 63 bb6: { 64 unreachable; 65 } 66 67 bb7: { 68 StorageDead(_3); 69 _0 = const 0_u32; 70 goto -> bb8; 71 } 72 73 bb8: { 74 return; 75 } 76}