]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/remove_fake_borrows.rs
Update upstream source from tag 'upstream/1.49.0_beta.4+dfsg1'
[rustc.git] / src / test / mir-opt / remove_fake_borrows.rs
1 // Test that the fake borrows for matches are removed after borrow checking.
2
3 // ignore-wasm32-bare compiled with panic=abort by default
4
5 // EMIT_MIR remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
6 fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
7 match x {
8 Some(0) if c => 0,
9 _ => 1,
10 }
11 }
12
13 fn main() {
14 match_guard(None, true);
15 }