diff options
| author | Alex Macleod <alex@macleod.io> | 2020-07-17 15:45:50 +0100 |
|---|---|---|
| committer | Alex Macleod <alex@macleod.io> | 2020-07-17 15:45:50 +0100 |
| commit | f7979d3c9360ae6a4a688729fa518601029a7c76 (patch) | |
| tree | cf013e6a31b0ce191d46e1fe8dae98233621d5d9 | |
| parent | c2dbebd3d4ad21e80ef4e7535dd1e868aaad7e50 (diff) | |
| download | rust-f7979d3c9360ae6a4a688729fa518601029a7c76.tar.gz rust-f7979d3c9360ae6a4a688729fa518601029a7c76.zip | |
Add regression test for #69414
Closes #69414 (no longer ICEs after #74159)
| -rw-r--r-- | src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr | 4 |
2 files changed, 5 insertions, 2 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 index db15ececfa4..ea75a3d0403 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<T, const N: T>(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 35996e83361..616f0fa8f1a 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<T, const N: T>(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<T, const N: T>(PhantomData<[T; N]>); | ^ |
