2015-01-20 07:56:53 -06:00
|
|
|
fn f(x: &mut i32) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = 0;
|
|
|
|
f(&x);
|
|
|
|
//~^ ERROR mismatched types
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| expected mutable reference `&mut i32`
|
|
|
|
//~| found reference `&{integer}`
|
2016-08-19 18:05:37 -05:00
|
|
|
//~| types differ in mutability
|
2015-01-20 07:56:53 -06:00
|
|
|
}
|