about summary refs log tree commit diff
path: root/tests/ui/coercion/coerce-block-tail-26978.rs
blob: 96e0cefb95576fa043f5b117d9deace511a7a5a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ check-fail
fn f(_: &i32) {}

fn main() {
    let x = Box::new(1i32);

    f(&x);
    f(&(x));
    f(&{x});
    //~^ ERROR mismatched types
}