]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | // MIR for `num_to_digit` after PreCodegen |
2 | ||
3 | fn num_to_digit(_1: char) -> u32 { | |
4 | debug num => _1; // in scope 0 at $DIR/issue-59352.rs:12:21: 12:24 | |
5 | let mut _0: u32; // return place in scope 0 at $DIR/issue-59352.rs:12:35: 12:38 | |
6a06907d | 6 | let mut _2: char; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:11 |
5869c6ff XL |
7 | let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:41 |
8 | let mut _4: char; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:29 | |
9 | let mut _5: u32; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23 | |
ee023bcb | 10 | let mut _11: isize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL |
5869c6ff | 11 | scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue-59352.rs:14:8: 14:23 |
ee023bcb FG |
12 | debug self => _2; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL |
13 | debug radix => _5; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
14 | let mut _6: &std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
15 | let _7: std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
16 | let mut _8: char; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
17 | scope 2 (inlined Option::<u32>::is_some) { // at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
18 | debug self => _6; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL | |
19 | let mut _9: isize; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL | |
5869c6ff XL |
20 | } |
21 | } | |
22 | scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue-59352.rs:14:26: 14:50 | |
ee023bcb FG |
23 | debug self => _3; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL |
24 | let mut _10: isize; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL | |
5869c6ff | 25 | scope 4 { |
ee023bcb | 26 | debug val => _0; // in scope 4 at $SRC_DIR/core/src/option.rs:LL:COL |
5869c6ff XL |
27 | } |
28 | } | |
29 | ||
30 | bb0: { | |
6a06907d XL |
31 | StorageLive(_2); // scope 0 at $DIR/issue-59352.rs:14:8: 14:11 |
32 | _2 = _1; // scope 0 at $DIR/issue-59352.rs:14:8: 14:11 | |
5869c6ff XL |
33 | StorageLive(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 |
34 | _5 = const 8_u32; // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 | |
ee023bcb FG |
35 | StorageLive(_6); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL |
36 | StorageLive(_7); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
37 | StorageLive(_8); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
38 | _8 = _2; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
39 | _7 = char::methods::<impl char>::to_digit(move _8, const 8_u32) -> bb5; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
5869c6ff | 40 | // mir::Constant |
ee023bcb FG |
41 | // + span: $SRC_DIR/core/src/char/methods.rs:LL:COL |
42 | // + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) } | |
5869c6ff XL |
43 | } |
44 | ||
45 | bb1: { | |
94222f64 | 46 | StorageDead(_11); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 |
5869c6ff XL |
47 | StorageLive(_3); // scope 0 at $DIR/issue-59352.rs:14:26: 14:41 |
48 | StorageLive(_4); // scope 0 at $DIR/issue-59352.rs:14:26: 14:29 | |
49 | _4 = _1; // scope 0 at $DIR/issue-59352.rs:14:26: 14:29 | |
94222f64 | 50 | _3 = char::methods::<impl char>::to_digit(move _4, const 8_u32) -> bb2; // scope 0 at $DIR/issue-59352.rs:14:26: 14:41 |
5869c6ff XL |
51 | // mir::Constant |
52 | // + span: $DIR/issue-59352.rs:14:30: 14:38 | |
ee023bcb | 53 | // + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) } |
5869c6ff XL |
54 | } |
55 | ||
56 | bb2: { | |
5869c6ff | 57 | StorageDead(_4); // scope 0 at $DIR/issue-59352.rs:14:40: 14:41 |
6a06907d | 58 | StorageLive(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50 |
ee023bcb FG |
59 | _10 = discriminant(_3); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL |
60 | switchInt(move _10) -> [0_isize: bb6, 1_isize: bb8, otherwise: bb7]; // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL | |
5869c6ff XL |
61 | } |
62 | ||
94222f64 XL |
63 | bb3: { |
64 | StorageDead(_11); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 | |
65 | _0 = const 0_u32; // scope 0 at $DIR/issue-59352.rs:14:60: 14:61 | |
66 | goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63 | |
67 | } | |
68 | ||
5869c6ff | 69 | bb4: { |
5869c6ff XL |
70 | return; // scope 0 at $DIR/issue-59352.rs:15:2: 15:2 |
71 | } | |
72 | ||
73 | bb5: { | |
ee023bcb FG |
74 | _6 = &_7; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL |
75 | StorageDead(_8); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
76 | StorageLive(_9); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
77 | _9 = discriminant((*_6)); // scope 2 at $SRC_DIR/core/src/option.rs:LL:COL | |
78 | StorageLive(_11); // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL | |
79 | _11 = move _9; // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL | |
80 | StorageDead(_9); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
81 | StorageDead(_6); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
82 | StorageDead(_7); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL | |
5869c6ff | 83 | StorageDead(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 |
6a06907d | 84 | StorageDead(_2); // scope 0 at $DIR/issue-59352.rs:14:22: 14:23 |
94222f64 | 85 | switchInt(move _11) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/issue-59352.rs:14:8: 14:23 |
5869c6ff XL |
86 | } |
87 | ||
88 | bb6: { | |
ee023bcb | 89 | core::panicking::panic(const "called `Option::unwrap()` on a `None` value"); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL |
5869c6ff | 90 | // mir::Constant |
ee023bcb | 91 | // + span: $SRC_DIR/core/src/option.rs:LL:COL |
5869c6ff | 92 | // + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(Scalar(<ZST>)) } |
5869c6ff | 93 | // mir::Constant |
ee023bcb | 94 | // + span: $SRC_DIR/core/src/option.rs:LL:COL |
17df50a5 | 95 | // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [99, 97, 108, 108, 101, 100, 32, 96, 79, 112, 116, 105, 111, 110, 58, 58, 117, 110, 119, 114, 97, 112, 40, 41, 96, 32, 111, 110, 32, 97, 32, 96, 78, 111, 110, 101, 96, 32, 118, 97, 108, 117, 101], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [8796093022207], len: Size { raw: 43 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 43 }) } |
5869c6ff XL |
96 | } |
97 | ||
98 | bb7: { | |
ee023bcb | 99 | unreachable; // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL |
5869c6ff XL |
100 | } |
101 | ||
102 | bb8: { | |
ee023bcb | 103 | _0 = move ((_3 as Some).0: u32); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL |
6a06907d | 104 | StorageDead(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50 |
5869c6ff XL |
105 | StorageDead(_3); // scope 0 at $DIR/issue-59352.rs:14:49: 14:50 |
106 | goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63 | |
107 | } | |
108 | } |