2020-10-07 15:59:18 -05:00
|
|
|
// MIR for `num_to_digit` after PreCodegen
|
|
|
|
|
|
|
|
fn num_to_digit(_1: char) -> u32 {
|
2022-11-02 16:54:49 -05:00
|
|
|
debug num => _1; // in scope 0 at $DIR/issue_59352.rs:+0:21: +0:24
|
|
|
|
let mut _0: u32; // return place in scope 0 at $DIR/issue_59352.rs:+0:35: +0:38
|
2022-04-24 16:34:24 -05:00
|
|
|
let mut _2: std::option::Option<u32>; // in scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
|
2022-12-25 11:52:42 -06:00
|
|
|
let mut _3: u32; // in scope 0 at $DIR/issue_59352.rs:+2:12: +2:23
|
2023-04-05 03:44:20 -05:00
|
|
|
scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue_59352.rs:15:12: 15:23
|
2022-04-24 16:34:24 -05:00
|
|
|
debug self => _1; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
debug radix => _3; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
let mut _4: &std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
let _5: std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2022-02-27 09:09:52 -06:00
|
|
|
scope 2 (inlined Option::<u32>::is_some) { // at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2022-04-24 16:34:24 -05:00
|
|
|
debug self => _4; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
2023-01-29 12:50:33 -06:00
|
|
|
let mut _6: isize; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
}
|
2023-04-05 03:44:20 -05:00
|
|
|
scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue_59352.rs:15:42: 15:50
|
2022-04-24 16:34:24 -05:00
|
|
|
debug self => _2; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _7: isize; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _8: !; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
scope 4 {
|
2022-02-27 09:09:52 -06:00
|
|
|
debug val => _0; // in scope 4 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2022-12-25 11:52:42 -06:00
|
|
|
StorageLive(_3); // scope 0 at $DIR/issue_59352.rs:+2:12: +2:23
|
2022-04-24 16:34:24 -05:00
|
|
|
StorageLive(_4); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageLive(_5); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2023-01-29 12:50:33 -06:00
|
|
|
_5 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> bb5; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
// mir::Constant
|
2022-02-27 09:09:52 -06:00
|
|
|
// + span: $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(<ZST>) }
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-04-24 16:34:24 -05:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
|
2023-01-29 12:50:33 -06:00
|
|
|
_2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> bb2; // scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
|
2020-10-07 15:59:18 -05:00
|
|
|
// mir::Constant
|
2023-04-05 03:44:20 -05:00
|
|
|
// + span: $DIR/issue_59352.rs:15:30: 15:38
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(<ZST>) }
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2022-04-24 16:34:24 -05:00
|
|
|
_7 = discriminant(_2); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2022-12-03 18:03:27 -06:00
|
|
|
switchInt(move _7) -> [0: bb6, 1: bb8, otherwise: bb7]; // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
2021-09-01 16:52:17 -05:00
|
|
|
bb3: {
|
2022-11-02 16:54:49 -05:00
|
|
|
_0 = const 0_u32; // scope 0 at $DIR/issue_59352.rs:+2:60: +2:61
|
|
|
|
goto -> bb4; // scope 0 at $DIR/issue_59352.rs:+2:5: +2:63
|
2021-09-01 16:52:17 -05:00
|
|
|
}
|
|
|
|
|
2020-10-07 15:59:18 -05:00
|
|
|
bb4: {
|
2022-11-02 16:54:49 -05:00
|
|
|
return; // scope 0 at $DIR/issue_59352.rs:+3:2: +3:2
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2022-04-24 16:34:24 -05:00
|
|
|
_4 = &_5; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2023-01-29 12:50:33 -06:00
|
|
|
_6 = discriminant((*_4)); // scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
2022-04-24 16:34:24 -05:00
|
|
|
StorageDead(_4); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageDead(_5); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2022-12-25 11:52:42 -06:00
|
|
|
StorageDead(_3); // scope 0 at $DIR/issue_59352.rs:+2:12: +2:23
|
2023-01-29 12:50:33 -06:00
|
|
|
switchInt(move _6) -> [1: bb1, otherwise: bb3]; // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2022-04-24 16:34:24 -05:00
|
|
|
_8 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value"); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
// mir::Constant
|
2022-02-27 09:09:52 -06:00
|
|
|
// + span: $SRC_DIR/core/src/option.rs:LL:COL
|
2022-07-06 09:14:46 -05:00
|
|
|
// + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(<ZST>) }
|
2020-10-07 15:59:18 -05:00
|
|
|
// mir::Constant
|
2022-02-27 09:09:52 -06:00
|
|
|
// + span: $SRC_DIR/core/src/option.rs:LL:COL
|
2022-05-06 03:58:54 -05:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2022-02-27 09:09:52 -06:00
|
|
|
unreachable; // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8: {
|
2022-04-24 16:34:24 -05:00
|
|
|
_0 = move ((_2 as Some).0: u32); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/issue_59352.rs:+2:49: +2:50
|
2022-11-02 16:54:49 -05:00
|
|
|
goto -> bb4; // scope 0 at $DIR/issue_59352.rs:+2:5: +2:63
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
}
|