about summary refs log tree commit diff
path: root/tests/ui/coercion/coerce-mut.rs
blob: d3ed0a52303c4f1d523888fc0add849bb61a9883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ dont-require-annotations: NOTE

fn f(x: &mut i32) {}

fn main() {
    let x = 0;
    f(&x);
    //~^ ERROR mismatched types
    //~| NOTE expected mutable reference `&mut i32`
    //~| NOTE found reference `&{integer}`
    //~| NOTE types differ in mutability
}