Skip to content

Commit 6315d0c

Browse files
committed
Add test for #71042
1 parent 4b87f97 commit 6315d0c

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![feature(impl_trait_in_bindings)]
2+
#![allow(incomplete_features)]
3+
4+
fn main() {
5+
const C: impl Copy = 0;
6+
match C {
7+
C | _ => {} //~ ERROR: opaque types cannot be used in patterns
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: opaque types cannot be used in patterns
2+
--> $DIR/issue-71042-opaquely-typed-constant-used-in-pattern.rs:7:9
3+
|
4+
LL | C | _ => {}
5+
| ^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)