]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr
use structured suggestion for "missing mut" label
[rust.git] / src / test / ui / borrowck / borrowck-borrow-immut-deref-of-box-as-mut.stderr
1 error[E0596]: cannot borrow immutable `Box` content `*a` as mutable
2   --> $DIR/borrowck-borrow-immut-deref-of-box-as-mut.rs:22:5
3    |
4 LL |     let a: Box<_> = box A;
5    |         - help: make this binding mutable: `mut a`
6 LL |     a.foo();
7    |     ^ cannot borrow as mutable
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0596`.