// Test that NLL generates proper error spans for trait HRTB errors // //@ compile-flags:-Zno-leak-check trait Foo<'a> {} fn make_foo<'a>() -> Box> { panic!() } fn main() { let x: Box> = make_foo(); let y: Box Foo<'a>> = x; //~ ERROR mismatched types [E0308] }