rust/tests/ui/coercion/coerce-mut.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
215 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 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
}