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