// compile-flags: -Ztrait-solver=next // Test that we don't incorrectly leak unconstrained inference variables // if the projection contained an error. This caused an ICE in writeback. trait Mirror { type Assoc: ?Sized; } struct Wrapper(T); impl Mirror for Wrapper { type Assoc = T; } fn mirror(_: W) -> Box { todo!() } fn type_error() -> TypeError { todo!() } //~^ ERROR cannot find type `TypeError` in this scope fn main() { let x = mirror(type_error()); }