diff options
Diffstat (limited to 'src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs')
-rw-r--r-- | src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs new file mode 100644 index 000000000..781f50e61 --- /dev/null +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs @@ -0,0 +1,9 @@ +// compile-flags: -Zsave-analysis +// Regression test for #69414 ^ + +use std::marker::PhantomData; + +struct B<T, const N: T>(PhantomData<[T; N]>); +//~^ ERROR the type of const parameters must not depend on other generic parameters + +fn main() {} |