]> git.proxmox.com Git - rustc.git/blob - tests/ui/sized/recursive-type-2.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / sized / recursive-type-2.rs
1 // build-fail
2 //~^ ERROR cycle detected when computing layout of `Foo<()>`
3
4 trait A { type Assoc: ?Sized; }
5
6 impl A for () {
7 type Assoc = Foo<()>;
8 }
9 struct Foo<T: A>(T::Assoc);
10
11 fn main() {
12 let x: Foo<()>;
13 }