diff options
Diffstat (limited to 'src/test/ui/const-generics/forbid-non-structural_match-types.rs')
-rw-r--r-- | src/test/ui/const-generics/forbid-non-structural_match-types.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/forbid-non-structural_match-types.rs b/src/test/ui/const-generics/forbid-non-structural_match-types.rs new file mode 100644 index 000000000..6ae9d5cfb --- /dev/null +++ b/src/test/ui/const-generics/forbid-non-structural_match-types.rs @@ -0,0 +1,13 @@ +#![feature(adt_const_params)] +#![allow(incomplete_features)] + +#[derive(PartialEq, Eq)] +struct A; + +struct B<const X: A>; // ok + +struct C; + +struct D<const X: C>; //~ ERROR `C` must be annotated with `#[derive(PartialEq, Eq)]` + +fn main() {} |