2025-04-05 19:19:56 +03:00
|
|
|
//@ dont-require-annotations: NOTE
|
|
|
|
|
|
2015-01-20 22:56:53 +09:00
|
|
|
fn f(x: &mut i32) {}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let x = 0;
|
|
|
|
|
f(&x);
|
|
|
|
|
//~^ ERROR mismatched types
|
2025-04-05 19:19:56 +03:00
|
|
|
//~| NOTE expected mutable reference `&mut i32`
|
|
|
|
|
//~| NOTE found reference `&{integer}`
|
|
|
|
|
//~| NOTE types differ in mutability
|
2015-01-20 22:56:53 +09:00
|
|
|
}
|