]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51515.rs
Do not use a suggestion to change a binding's name to a type
[rust.git] / src / test / ui / issues / issue-51515.rs
1 fn main() {
2     let foo = &16;
3     //~^ HELP consider changing this to be a mutable reference
4     //~| SUGGESTION &mut 16
5     *foo = 32;
6     //~^ ERROR cannot assign to `*foo`, which is behind a `&` reference
7     let bar = foo;
8     *bar = 64;
9     //~^ ERROR cannot assign to `*bar`, which is behind a `&` reference
10 }