trait Bound {}
trait Normalize {
type Assoc;
}
impl<T: Bound> Normalize for T {
type Assoc = T;
}
impl<T: Bound> Normalize for [T] {
type Assoc = T;
}
impl Bound for Hello {}
enum Hello {
Variant(<[Hello] as Normalize>::Assoc),
}
error[E0391]: cycle detected when computing layout of `<[Hello] as Normalize>::Assoc`
|
= note: ...which requires computing layout of `Hello`...
= note: ...which again requires computing layout of `<[Hello] as Normalize>::Assoc`, completing the cycle
= note: cycle used when computing layout of `Hello`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
likely due to lazy norm
https://rust.godbolt.org/z/Gce6rnTTc, cc https://github.com/rust-lang/rust/issues/129541