1 // This file must never have a trailing newline
4 // compile-flags: -Z borrowck=compare
6 fn id<T>(x: T) -> T { x }
10 let y = x.as_ref().unwrap_or(&id(5));
11 //[ast]~^ ERROR borrowed value does not live long enough (Ast)
12 //[mir]~^^ ERROR borrowed value does not live long enough (Ast)
13 // This actually passes in mir