about summary refs log tree commit diff
path: root/tests/ui/traits/solver-cycles/129541-recursive-enum-and-array-impl.rs
blob: 197207dfb4be82d1c8053e84254d39ffc25a04e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Regression test for #129541
//~^ ERROR cycle detected when computing layout of `<[Hello] as Normalize>::Assoc` [E0391]

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),
}

fn main() {}