summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coerce-mut.rs
blob: 43f0b55856d3c6eba5908cd584b83d67297973bc (plain)
1
2
3
4
5
6
7
8
9
10
fn f(x: &mut i32) {}

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