Skip to content

Commit

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

Closes rust-lang#69414 (no longer ICEs after rust-lang#74159)
  • Loading branch information
Manishearth committed Jul 18, 2020
2 parents 9ad1d26 + f7979d3 commit 0e8b901
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 0e8b901

Please sign in to comment.