about summary refs log tree commit diff
path: root/tests/ui/borrowck/issue-11493.rs
blob: d83320a2cdb74e1f3622a58ee7eef3c8736f26e1 (plain)
1
2
3
4
5
6
7
8
//@ run-rustfix
fn id<T>(x: T) -> T { x }

fn main() {
    let x = Some(3);
    let y = x.as_ref().unwrap_or(&id(5));  //~ ERROR
    let _ = &y;
}