Skip to content

Commit 334c6c5

Browse files
Add regression test
1 parent 66ac5a2 commit 334c6c5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/test/ui/issues/issue-78115.rs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Regression test for issue #78115: "ICE: variable should be placed in scope earlier"
2+
3+
// check-pass
4+
// edition:2018
5+
6+
#[allow(dead_code)]
7+
struct Foo {
8+
a: ()
9+
}
10+
11+
async fn _bar() {
12+
let foo = Foo { a: () };
13+
match foo {
14+
Foo { a: _a } | Foo { a: _a } if true => {}
15+
_ => {}
16+
}
17+
}
18+
19+
fn main() {}

0 commit comments

Comments
 (0)