2022-08-20 23:47:53 -05:00
|
|
|
// MIR for `new` after PreCodegen
|
|
|
|
|
|
|
|
fn new(_1: Result<T, E>) -> Result<T, E> {
|
2023-04-23 04:38:37 -05:00
|
|
|
debug x => _1; // in scope 0 at $DIR/try_identity.rs:+0:14: +0:15
|
|
|
|
let mut _0: std::result::Result<T, E>; // return place in scope 0 at $DIR/try_identity.rs:+0:34: +0:46
|
|
|
|
let mut _2: std::ops::ControlFlow<E, T>; // in scope 0 at $DIR/try_identity.rs:+2:15: +7:10
|
|
|
|
let mut _3: isize; // in scope 0 at $DIR/try_identity.rs:+4:17: +4:22
|
|
|
|
let _4: T; // in scope 0 at $DIR/try_identity.rs:+4:20: +4:21
|
|
|
|
let _5: E; // in scope 0 at $DIR/try_identity.rs:+5:21: +5:22
|
|
|
|
let mut _6: isize; // in scope 0 at $DIR/try_identity.rs:+8:13: +8:37
|
|
|
|
let _7: T; // in scope 0 at $DIR/try_identity.rs:+8:35: +8:36
|
|
|
|
let _8: E; // in scope 0 at $DIR/try_identity.rs:+9:32: +9:33
|
2022-08-20 23:47:53 -05:00
|
|
|
scope 1 {
|
2023-04-23 04:38:37 -05:00
|
|
|
debug v => _4; // in scope 1 at $DIR/try_identity.rs:+4:20: +4:21
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
scope 2 {
|
2023-04-23 04:38:37 -05:00
|
|
|
debug e => _5; // in scope 2 at $DIR/try_identity.rs:+5:21: +5:22
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
scope 3 {
|
2023-04-23 04:38:37 -05:00
|
|
|
debug v => _7; // in scope 3 at $DIR/try_identity.rs:+8:35: +8:36
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
scope 4 {
|
2023-04-23 04:38:37 -05:00
|
|
|
debug e => _8; // in scope 4 at $DIR/try_identity.rs:+9:32: +9:33
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-04-23 04:38:37 -05:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/try_identity.rs:+2:15: +7:10
|
|
|
|
_3 = discriminant(_1); // scope 0 at $DIR/try_identity.rs:+3:19: +3:20
|
|
|
|
switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2]; // scope 0 at $DIR/try_identity.rs:+3:13: +3:20
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-04-23 04:38:37 -05:00
|
|
|
_5 = move ((_1 as Err).0: E); // scope 0 at $DIR/try_identity.rs:+5:21: +5:22
|
|
|
|
_2 = ControlFlow::<E, T>::Break(move _5); // scope 2 at $DIR/try_identity.rs:+5:27: +5:48
|
|
|
|
goto -> bb4; // scope 0 at $DIR/try_identity.rs:+5:47: +5:48
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-04-23 04:38:37 -05:00
|
|
|
unreachable; // scope 0 at $DIR/try_identity.rs:+3:19: +3:20
|
2023-02-24 15:32:10 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-04-23 04:38:37 -05:00
|
|
|
_4 = move ((_1 as Ok).0: T); // scope 0 at $DIR/try_identity.rs:+4:20: +4:21
|
|
|
|
_2 = ControlFlow::<E, T>::Continue(move _4); // scope 1 at $DIR/try_identity.rs:+4:26: +4:50
|
|
|
|
goto -> bb4; // scope 0 at $DIR/try_identity.rs:+4:49: +4:50
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
|
2023-02-24 15:32:10 -06:00
|
|
|
bb4: {
|
2023-04-23 04:38:37 -05:00
|
|
|
_6 = discriminant(_2); // scope 0 at $DIR/try_identity.rs:+2:15: +7:10
|
|
|
|
switchInt(move _6) -> [0: bb6, 1: bb5, otherwise: bb2]; // scope 0 at $DIR/try_identity.rs:+2:9: +7:10
|
2023-01-25 12:34:19 -06:00
|
|
|
}
|
|
|
|
|
2023-02-24 15:32:10 -06:00
|
|
|
bb5: {
|
2023-04-23 04:38:37 -05:00
|
|
|
_8 = move ((_2 as Break).0: E); // scope 0 at $DIR/try_identity.rs:+9:32: +9:33
|
|
|
|
_0 = Result::<T, E>::Err(move _8); // scope 4 at $DIR/try_identity.rs:+9:45: +9:51
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/try_identity.rs:+12:1: +12:2
|
|
|
|
goto -> bb7; // scope 0 at $DIR/try_identity.rs:+12:1: +12:2
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
|
2023-01-25 12:34:19 -06:00
|
|
|
bb6: {
|
2023-04-23 04:38:37 -05:00
|
|
|
_7 = move ((_2 as Continue).0: T); // scope 0 at $DIR/try_identity.rs:+8:35: +8:36
|
|
|
|
_0 = Result::<T, E>::Ok(move _7); // scope 0 at $DIR/try_identity.rs:+1:5: +11:6
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/try_identity.rs:+12:1: +12:2
|
|
|
|
goto -> bb7; // scope 0 at $DIR/try_identity.rs:+12:1: +12:2
|
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
|
|
|
return; // scope 0 at $DIR/try_identity.rs:+12:2: +12:2
|
2022-08-20 23:47:53 -05:00
|
|
|
}
|
|
|
|
}
|