blob: 64d9822bab4daadbdff8a2f5f6ea96acea1b2dfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![feature(nll)]
fn main() {
let foo = &16;
//~^ HELP consider changing this to be a mutable reference
//~| SUGGESTION &mut 16
*foo = 32;
//~^ ERROR cannot assign to `*foo` which is behind a `&` reference
let bar = foo;
//~^ HELP consider changing this to be a mutable reference
//~| SUGGESTION &mut i32
*bar = 64;
//~^ ERROR cannot assign to `*bar` which is behind a `&` reference
}
|