Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Oct 19, 2020
1 parent 66ac5a2 commit 334c6c5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/ui/issues/issue-78115.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Regression test for issue #78115: "ICE: variable should be placed in scope earlier"

// check-pass
// edition:2018

#[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() {}

0 comments on commit 334c6c5

Please sign in to comment.