blob: 841fc30a50bcf44dac6568c464968608fcb571e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//@ build-fail
//~^ ERROR cycle detected when computing layout of `Wrapper<()>`
trait Trait {
type Assoc;
}
impl Trait for () {
type Assoc = Wrapper<()>;
}
struct Wrapper<T: Trait> {
_x: <T as Trait>::Assoc,
}
fn abi<T: Trait>(_: Option<Wrapper<T>>) {}
fn indirect<T: Trait>() {
abi::<T>(None);
}
fn main() {
indirect::<()>();
}
|