Skip to content

Commit

Permalink
Add test for rust-lang#71042
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed May 26, 2020
1 parent 4b87f97 commit 6315d0c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![feature(impl_trait_in_bindings)]
#![allow(incomplete_features)]

fn main() {
const C: impl Copy = 0;
match C {
C | _ => {} //~ ERROR: opaque types cannot be used in patterns
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: opaque types cannot be used in patterns
--> $DIR/issue-71042-opaquely-typed-constant-used-in-pattern.rs:7:9
|
LL | C | _ => {}
| ^

error: aborting due to previous error

0 comments on commit 6315d0c

Please sign in to comment.