|
3 | 3 | fn num_to_digit(_1: char) -> u32 {
|
4 | 4 | debug num => _1;
|
5 | 5 | let mut _0: u32;
|
6 |
| - let mut _4: std::option::Option<u32>; |
| 6 | + let mut _8: std::option::Option<u32>; |
7 | 7 | scope 1 (inlined char::methods::<impl char>::is_digit) {
|
8 |
| - let _2: std::option::Option<u32>; |
9 |
| - scope 2 (inlined Option::<u32>::is_some) { |
10 |
| - let mut _3: isize; |
| 8 | + scope 2 (inlined char::methods::<impl char>::to_digit) { |
| 9 | + let mut _2: u32; |
| 10 | + let mut _3: u32; |
| 11 | + let mut _4: bool; |
| 12 | + scope 3 { |
| 13 | + scope 5 (inlined Arguments::<'_>::new_const::<1>) { |
| 14 | + } |
| 15 | + scope 6 (inlined core::num::<impl u32>::wrapping_sub) { |
| 16 | + } |
| 17 | + scope 7 (inlined core::num::<impl u32>::saturating_add) { |
| 18 | + } |
| 19 | + } |
| 20 | + scope 4 (inlined core::num::<impl u32>::wrapping_sub) { |
| 21 | + } |
| 22 | + } |
| 23 | + scope 8 (inlined Option::<u32>::is_some) { |
11 | 24 | }
|
12 | 25 | }
|
13 |
| - scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { |
14 |
| - let mut _5: isize; |
15 |
| - let mut _6: !; |
16 |
| - scope 4 { |
| 26 | + scope 9 (inlined char::methods::<impl char>::to_digit) { |
| 27 | + let mut _5: u32; |
| 28 | + let mut _6: bool; |
| 29 | + scope 10 { |
| 30 | + scope 12 (inlined Arguments::<'_>::new_const::<1>) { |
| 31 | + } |
| 32 | + scope 13 (inlined core::num::<impl u32>::wrapping_sub) { |
| 33 | + } |
| 34 | + scope 14 (inlined core::num::<impl u32>::saturating_add) { |
| 35 | + } |
| 36 | + } |
| 37 | + scope 11 (inlined core::num::<impl u32>::wrapping_sub) { |
| 38 | + } |
| 39 | + } |
| 40 | + scope 15 (inlined #[track_caller] Option::<u32>::unwrap) { |
| 41 | + let mut _7: !; |
| 42 | + scope 16 { |
17 | 43 | }
|
18 | 44 | }
|
19 | 45 |
|
20 | 46 | bb0: {
|
21 |
| - StorageLive(_2); |
22 |
| - _2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind unreachable]; |
| 47 | + _2 = _1 as u32 (IntToInt); |
| 48 | + _3 = Sub(_2, const 48_u32); |
| 49 | + StorageLive(_4); |
| 50 | + _4 = Lt(_3, const 8_u32); |
| 51 | + switchInt(move _4) -> [0: bb1, otherwise: bb2]; |
23 | 52 | }
|
24 | 53 |
|
25 | 54 | bb1: {
|
26 |
| - StorageLive(_3); |
27 |
| - _3 = discriminant(_2); |
28 |
| - switchInt(move _3) -> [1: bb2, 0: bb6, otherwise: bb8]; |
| 55 | + StorageDead(_4); |
| 56 | + _0 = const 0_u32; |
| 57 | + goto -> bb5; |
29 | 58 | }
|
30 | 59 |
|
31 | 60 | bb2: {
|
32 |
| - StorageDead(_3); |
33 |
| - StorageDead(_2); |
34 |
| - StorageLive(_4); |
35 |
| - _4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind unreachable]; |
| 61 | + StorageDead(_4); |
| 62 | + StorageLive(_8); |
| 63 | + _5 = Sub(_2, const 48_u32); |
| 64 | + StorageLive(_6); |
| 65 | + _6 = Lt(_5, const 8_u32); |
| 66 | + switchInt(move _6) -> [0: bb3, otherwise: bb4]; |
36 | 67 | }
|
37 | 68 |
|
38 | 69 | bb3: {
|
39 |
| - StorageLive(_5); |
40 |
| - _5 = discriminant(_4); |
41 |
| - switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb8]; |
| 70 | + StorageDead(_6); |
| 71 | + _7 = option::unwrap_failed() -> unwind unreachable; |
42 | 72 | }
|
43 | 73 |
|
44 | 74 | bb4: {
|
45 |
| - _6 = option::unwrap_failed() -> unwind unreachable; |
| 75 | + _8 = Option::<u32>::Some(_5); |
| 76 | + StorageDead(_6); |
| 77 | + _0 = move ((_8 as Some).0: u32); |
| 78 | + StorageDead(_8); |
| 79 | + goto -> bb5; |
46 | 80 | }
|
47 | 81 |
|
48 | 82 | bb5: {
|
49 |
| - _0 = move ((_4 as Some).0: u32); |
50 |
| - StorageDead(_5); |
51 |
| - StorageDead(_4); |
52 |
| - goto -> bb7; |
53 |
| - } |
54 |
| - |
55 |
| - bb6: { |
56 |
| - StorageDead(_3); |
57 |
| - StorageDead(_2); |
58 |
| - _0 = const 0_u32; |
59 |
| - goto -> bb7; |
60 |
| - } |
61 |
| - |
62 |
| - bb7: { |
63 | 83 | return;
|
64 | 84 | }
|
65 |
| - |
66 |
| - bb8: { |
67 |
| - unreachable; |
68 |
| - } |
69 | 85 | }
|
0 commit comments