Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//! Ensure a self-referencing lazy type alias with `min_generic_const_args`
//! doesn't ICE during normalization.
//!
//! Regression test for <https://github.com/rust-lang/rust/issues/152633>.
#![feature(lazy_type_alias)]
#![feature(min_generic_const_args)]

trait Trait {
type const ASSOC: ();
}
type Arr2 = [usize; <Arr2 as Trait>::ASSOC]; //~ ERROR E0275

fn main() {}
11 changes: 11 additions & 0 deletions tests/ui/type-alias/recursive-lazy-type-alias-ice-152633.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0275]: overflow normalizing the type alias `Arr2`
--> $DIR/recursive-lazy-type-alias-ice-152633.rs:12:1
|
LL | type Arr2 = [usize; <Arr2 as Trait>::ASSOC];
| ^^^^^^^^^
|
= note: in case this is a recursive type alias, consider using a struct, enum, or union instead

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0275`.
Loading