]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/assign-non-lval-needs-deref.stderr
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / typeck / assign-non-lval-needs-deref.stderr
1 error[E0067]: invalid left-hand side of assignment
2   --> $DIR/assign-non-lval-needs-deref.rs:15:16
3    |
4 LL |     (&mut Foo) += ();
5    |     ---------- ^^
6    |     |
7    |     cannot assign to this expression
8    |
9 help: consider dereferencing the left-hand side of this operation
10    |
11 LL |     *(&mut Foo) += ();
12    |     +
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0067`.