blob: 71ccc8de94da2a24b3d81d9eff1510c7e10d18ff [file] [edit]
//@ build-fail
trait Trait {
type Assoc;
}
impl Trait for () {
type Assoc = Wrapper<()>;
}
struct Wrapper<T: Trait> {
//~^ ERROR cycle detected when computing layout of `Wrapper<()>`
_x: <T as Trait>::Assoc,
}
fn abi<T: Trait>(_: Option<Wrapper<T>>) {}
fn indirect<T: Trait>() {
abi::<T>(None);
}
fn main() {
indirect::<()>();
}