fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
let x = Test { s: "this cannot last" };
&x
- //~^ ERROR: `x` does not live long enough
+ //~^ ERROR: cannot return reference to local variable `x`
}
impl<'b> Trait for Test<'b> { type Out = Test<'b>; }