11 lines
317 B
Rust
11 lines
317 B
Rust
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;
|
|
*bar = 64;
|
|
//~^ ERROR cannot assign to `*bar`, which is behind a `&` reference
|
|
}
|