rust/src/test/ui/issues/issue-11493.rs
2019-04-22 08:40:08 +01:00

8 lines
123 B
Rust

fn id<T>(x: T) -> T { x }
fn main() {
let x = Some(3);
let y = x.as_ref().unwrap_or(&id(5)); //~ ERROR
&y;
}