Skip to content

Commit f7979d3

Browse files
committed
Add regression test for #69414
Closes #69414 (no longer ICEs after #74159)
1 parent c2dbebd commit f7979d3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// compile-flags: -Zsave-analysis
2+
// Regression test for #69414 ^
3+
14
use std::marker::PhantomData;
25

36
struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable

src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0770]: the type of const parameters must not depend on other generic parameters
2-
--> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22
2+
--> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:22
33
|
44
LL | struct B<T, const N: T>(PhantomData<[T; N]>);
55
| ^ the type must not depend on the parameter `T`
66

77
error[E0658]: const generics are unstable
8-
--> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:19
8+
--> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:19
99
|
1010
LL | struct B<T, const N: T>(PhantomData<[T; N]>);
1111
| ^

0 commit comments

Comments
 (0)