]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-34569.rs
Rollup merge of #92942 - Xaeroxe:raw_arg, r=dtolnay
[rust.git] / src / test / ui / issues / issue-34569.rs
1 // run-pass
2 // compile-flags:-g
3 // ignore-asmjs wasm2js does not support source maps yet
4
5 // In this test we just want to make sure that the code below does not lead to
6 // a debuginfo verification assertion during compilation. This was caused by the
7 // closure in the guard being codegened twice due to how match expressions are
8 // handled.
9 //
10 // See https://github.com/rust-lang/rust/issues/34569 for details.
11
12 fn main() {
13     match 0 {
14         e if (|| { e == 0 })() => {},
15         1 => {},
16         _ => {}
17     }
18 }