//@error-in-other-file: a cycle occurred during layout computation //~^ ERROR: cycle detected when computing layout of use std::mem; pub struct S { pub f: ::I, } pub trait Tr { type I: Tr; } impl Tr for S { type I = S>; } impl Tr for () { type I = (); } fn foo() -> usize { mem::size_of::>() } fn main() { println!("{}", foo::>()); }