summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coerce-block-tail-26978.rs
blob: 01c8ab5a839fa70eac51a72fc89654287a9cec84 (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
}