Skip to content

Commit

Permalink
Rollup merge of #74444 - Alexendoo:test-69414, r=nikomatsakis
Browse files Browse the repository at this point in the history
Add regression test for #69414

Closes #69414 (no longer ICEs after #74159)
  • Loading branch information
Manishearth committed Jul 18, 2020
2 parents 8d1bb0e + f7979d3 commit 378f46d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]>);
| ^
Expand Down

0 comments on commit 378f46d

Please sign in to comment.