2020-10-19 23:32:07 +02:00
|
|
|
// Regression test for issue #78115: "ICE: variable should be placed in scope earlier"
|
|
|
|
|
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
|
|
|
|
//@ edition:2018
|
2020-10-19 23:32:07 +02:00
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
|
struct Foo {
|
|
|
|
|
a: ()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async fn _bar() {
|
|
|
|
|
let foo = Foo { a: () };
|
|
|
|
|
match foo {
|
|
|
|
|
Foo { a: _a } | Foo { a: _a } if true => {}
|
|
|
|
|
_ => {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|