2022-08-21 04:47:53 +00:00
|
|
|
// MIR for `old` after PreCodegen
|
|
|
|
|
|
|
|
fn old(_1: Result<T, E>) -> Result<T, E> {
|
|
|
|
debug x => _1; // in scope 0 at $DIR/try_identity_e2e.rs:+0:14: +0:15
|
|
|
|
let mut _0: std::result::Result<T, E>; // return place in scope 0 at $DIR/try_identity_e2e.rs:+0:34: +0:46
|
2022-04-24 21:34:24 +00:00
|
|
|
let mut _2: isize; // in scope 0 at $DIR/try_identity_e2e.rs:+3:13: +3:18
|
|
|
|
let _3: T; // in scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
|
2023-01-12 18:23:48 +00:00
|
|
|
let _4: E; // in scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
|
2022-08-21 04:47:53 +00:00
|
|
|
scope 1 {
|
2022-04-24 21:34:24 +00:00
|
|
|
debug v => _3; // in scope 1 at $DIR/try_identity_e2e.rs:+3:16: +3:17
|
2022-08-21 04:47:53 +00:00
|
|
|
}
|
|
|
|
scope 2 {
|
2022-04-24 21:34:24 +00:00
|
|
|
debug e => _4; // in scope 2 at $DIR/try_identity_e2e.rs:+4:17: +4:18
|
2022-08-21 04:47:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2022-04-24 21:34:24 +00:00
|
|
|
_2 = discriminant(_1); // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
|
2022-12-04 00:03:27 +00:00
|
|
|
switchInt(move _2) -> [0: bb3, 1: bb1, otherwise: bb2]; // scope 0 at $DIR/try_identity_e2e.rs:+2:9: +2:16
|
2022-08-21 04:47:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-04-24 21:34:24 +00:00
|
|
|
_4 = move ((_1 as Err).0: E); // scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
|
2022-08-21 04:47:53 +00:00
|
|
|
Deinit(_0); // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
|
2022-04-24 21:34:24 +00:00
|
|
|
((_0 as Err).0: E) = move _4; // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
|
2022-08-21 04:47:53 +00:00
|
|
|
discriminant(_0) = 1; // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
|
|
|
|
return; // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
unreachable; // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-04-24 21:34:24 +00:00
|
|
|
_3 = move ((_1 as Ok).0: T); // scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
|
2022-08-21 04:47:53 +00:00
|
|
|
Deinit(_0); // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
|
2022-04-24 21:34:24 +00:00
|
|
|
((_0 as Ok).0: T) = move _3; // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
|
2022-08-21 04:47:53 +00:00
|
|
|
discriminant(_0) = 0; // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
|
|
|
|
return; // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2
|
|
|
|
}
|
|
|
|
}
|