Add test for #71042
This commit is contained in:
parent
4b87f97ca8
commit
6315d0c99e
@ -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
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user