diff options
Diffstat (limited to 'src/test/ui/const-generics/occurs-check/unused-substs-1.rs')
-rw-r--r-- | src/test/ui/const-generics/occurs-check/unused-substs-1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/occurs-check/unused-substs-1.rs b/src/test/ui/const-generics/occurs-check/unused-substs-1.rs new file mode 100644 index 000000000..9d12250c9 --- /dev/null +++ b/src/test/ui/const-generics/occurs-check/unused-substs-1.rs @@ -0,0 +1,13 @@ +#![feature(generic_const_exprs)] +#![allow(incomplete_features)] + +trait Bar<const M: usize> {} +impl<const N: usize> Bar<N> for A<{ 6 + 1 }> {} + +struct A<const N: usize> +where + A<N>: Bar<N>; + +fn main() { + let _ = A; //~ERROR the trait bound +} |