rust/src/test/ui/coercion/coerce-mut.rs

11 lines
197 B
Rust
Raw Normal View History

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