2020-08-12 21:35:32 +00:00
|
|
|
- // MIR for `foo` before MatchBranchSimplification
|
|
|
|
+ // MIR for `foo` after MatchBranchSimplification
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
fn foo(_1: Option<()>) -> () {
|
2022-07-27 20:47:42 +02:00
|
|
|
debug bar => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:+0:8: +0:11
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/matches_reduce_branches.rs:+0:25: +0:25
|
|
|
|
let mut _2: isize; // in scope 0 at $DIR/matches_reduce_branches.rs:+1:22: +1:26
|
2021-07-23 18:55:36 -04:00
|
|
|
+ let mut _3: isize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2020-08-12 21:35:32 +00:00
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 20:47:42 +02:00
|
|
|
_2 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:+1:17: +1:20
|
2021-07-23 18:55:36 -04:00
|
|
|
- switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2021-03-16 21:32:53 -04:00
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb1: {
|
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb2: {
|
|
|
|
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bb3: {
|
2021-07-23 18:55:36 -04:00
|
|
|
+ StorageLive(_3); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
+ _3 = move _2; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
|
|
+ StorageDead(_3); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
2022-07-27 20:47:42 +02:00
|
|
|
return; // scope 0 at $DIR/matches_reduce_branches.rs:+4:2: +4:2
|
2020-08-12 21:35:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|