]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51515.rs
Re-blessed tests.
[rust.git] / src / test / ui / issues / issue-51515.rs
1 #![feature(nll)]
2
3 fn main() {
4     let foo = &16;
5     //~^ HELP consider changing this to be a mutable reference
6     //~| SUGGESTION &mut 16
7     *foo = 32;
8     //~^ ERROR cannot assign to `*foo` which is behind a `&` reference
9     let bar = foo;
10     //~^ HELP consider changing this to be a mutable reference
11     //~| SUGGESTION &mut i32
12     *bar = 64;
13     //~^ ERROR cannot assign to `*bar` which is behind a `&` reference
14 }