2020-10-07 15:59:18 -05:00
|
|
|
// MIR for `num_to_digit` after PreCodegen
|
|
|
|
|
|
|
|
fn num_to_digit(_1: char) -> u32 {
|
|
|
|
debug num => _1; // in scope 0 at $DIR/issue-59352.rs:12:21: 12:24
|
|
|
|
let mut _0: u32; // return place in scope 0 at $DIR/issue-59352.rs:12:35: 12:38
|
2021-03-05 18:00:00 -06:00
|
|
|
let mut _2: char; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:11
|
|
|
|
let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:41
|
|
|
|
let mut _4: char; // in scope 0 at $DIR/issue-59352.rs:14:26: 14:29
|
|
|
|
let mut _5: u32; // in scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
2022-04-16 08:27:54 -05:00
|
|
|
let mut _12: isize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue-59352.rs:14:8: 14:23
|
2022-02-27 09:09:52 -06:00
|
|
|
debug self => _2; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
debug radix => _5; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
let mut _6: &std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
let _7: std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
let mut _8: char; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
scope 2 (inlined Option::<u32>::is_some) { // at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
debug self => _6; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _9: isize; // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue-59352.rs:14:26: 14:50
|
2022-02-27 09:09:52 -06:00
|
|
|
debug self => _3; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
let mut _10: isize; // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2022-04-16 08:27:54 -05:00
|
|
|
let mut _11: !; // 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: {
|
2021-03-05 18:00:00 -06:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/issue-59352.rs:14:8: 14:11
|
|
|
|
_2 = _1; // scope 0 at $DIR/issue-59352.rs:14:8: 14:11
|
|
|
|
StorageLive(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
2022-02-27 09:09:52 -06:00
|
|
|
StorageLive(_6); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageLive(_7); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageLive(_8); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
_8 = _2; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
_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
|
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-02-21 01:10:07 -06:00
|
|
|
// + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) }
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-04-16 08:27:54 -05:00
|
|
|
StorageDead(_12); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
2021-03-05 18:00:00 -06:00
|
|
|
StorageLive(_3); // scope 0 at $DIR/issue-59352.rs:14:26: 14:41
|
|
|
|
StorageLive(_4); // scope 0 at $DIR/issue-59352.rs:14:26: 14:29
|
|
|
|
_4 = _1; // scope 0 at $DIR/issue-59352.rs:14:26: 14:29
|
2021-09-01 16:52:17 -05:00
|
|
|
_3 = char::methods::<impl char>::to_digit(move _4, const 8_u32) -> bb2; // scope 0 at $DIR/issue-59352.rs:14:26: 14:41
|
2020-10-07 15:59:18 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/issue-59352.rs:14:30: 14:38
|
2022-02-21 01:10:07 -06:00
|
|
|
// + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(Scalar(<ZST>)) }
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2021-03-05 18:00:00 -06:00
|
|
|
StorageDead(_4); // scope 0 at $DIR/issue-59352.rs:14:40: 14:41
|
|
|
|
StorageLive(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50
|
2022-02-27 09:09:52 -06:00
|
|
|
_10 = discriminant(_3); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
switchInt(move _10) -> [0_isize: bb6, 1_isize: 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-04-16 08:27:54 -05:00
|
|
|
StorageDead(_12); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
2021-09-01 16:52:17 -05:00
|
|
|
_0 = const 0_u32; // scope 0 at $DIR/issue-59352.rs:14:60: 14:61
|
|
|
|
goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
|
|
|
|
}
|
|
|
|
|
2020-10-07 15:59:18 -05:00
|
|
|
bb4: {
|
|
|
|
return; // scope 0 at $DIR/issue-59352.rs:15:2: 15:2
|
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2022-02-27 09:09:52 -06:00
|
|
|
_6 = &_7; // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageDead(_8); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageLive(_9); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
_9 = discriminant((*_6)); // scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
|
2022-04-16 08:27:54 -05:00
|
|
|
StorageLive(_12); // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
_12 = move _9; // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-02-27 09:09:52 -06:00
|
|
|
StorageDead(_9); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageDead(_6); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
|
|
|
StorageDead(_7); // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
|
2021-03-05 18:00:00 -06:00
|
|
|
StorageDead(_5); // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/issue-59352.rs:14:22: 14:23
|
2022-04-16 08:27:54 -05:00
|
|
|
switchInt(move _12) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/issue-59352.rs:14:8: 14:23
|
2020-10-07 15:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2022-04-16 08:27:54 -05:00
|
|
|
StorageLive(_11); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
|
|
|
_11 = 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
|
2020-10-07 15:59:18 -05:00
|
|
|
// + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(Scalar(<ZST>)) }
|
|
|
|
// 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-02-27 09:09:52 -06:00
|
|
|
_0 = move ((_3 as Some).0: u32); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
|
2021-03-05 18:00:00 -06:00
|
|
|
StorageDead(_10); // scope 0 at $DIR/issue-59352.rs:14:26: 14:50
|
|
|
|
StorageDead(_3); // scope 0 at $DIR/issue-59352.rs:14:49: 14:50
|
2020-10-07 15:59:18 -05:00
|
|
|
goto -> bb4; // scope 0 at $DIR/issue-59352.rs:14:5: 14:63
|
|
|
|
}
|
|
|
|
}
|