diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/mir-opt/simplify_match.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/mir-opt/simplify_match.rs b/src/test/mir-opt/simplify_match.rs new file mode 100644 index 00000000000..0192aa01d01 --- /dev/null +++ b/src/test/mir-opt/simplify_match.rs @@ -0,0 +1,22 @@ +fn main() { + match { let x = false; x } { + true => println!("hello world!"), + false => {}, + } +} + +// END RUST SOURCE +// START rustc.main.SimplifyBranches-after-copy-prop.before.mir +// bb0: { +// ... +// switchInt(const false) -> [false: bb3, otherwise: bb1]; +// } +// bb1: { +// END rustc.main.SimplifyBranches-after-copy-prop.before.mir +// START rustc.main.SimplifyBranches-after-copy-prop.after.mir +// bb0: { +// ... +// goto -> bb3; +// } +// bb1: { +// END rustc.main.SimplifyBranches-after-copy-prop.after.mir |
