summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs')
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs b/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs
new file mode 100644
index 000000000..781f50e61
--- /dev/null
+++ b/tests/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() {}