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 index db15ececfa436..ea75a3d040358 100644 --- 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 @@ -1,3 +1,6 @@ +// compile-flags: -Zsave-analysis +// Regression test for #69414 ^ + use std::marker::PhantomData; struct B(PhantomData<[T; N]>); //~ ERROR const generics are unstable diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr index 35996e833610d..616f0fa8f1af0 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr @@ -1,11 +1,11 @@ error[E0770]: the type of const parameters must not depend on other generic parameters - --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22 + --> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:22 | LL | struct B(PhantomData<[T; N]>); | ^ the type must not depend on the parameter `T` error[E0658]: const generics are unstable - --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:19 + --> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:19 | LL | struct B(PhantomData<[T; N]>); | ^