Add regression test for #69414
Closes #69414 (no longer ICEs after #74159)
This commit is contained in:
parent
c2dbebd3d4
commit
f7979d3c93
2 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]>);
|
||||
| ^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue