]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-borrow-immut-deref-of-box-as-mut.stderr
1 error[E0596]: cannot borrow `*a` as mutable, as `a` is not declared as mutable
2   --> $DIR/borrowck-borrow-immut-deref-of-box-as-mut.rs:12:5
3    |
4 LL |     a.foo();
5    |     ^^^^^^^ cannot borrow as mutable
6    |
7 help: consider changing this to be mutable
8    |
9 LL |     let mut a: Box<_> = Box::new(A);
10    |         +++
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0596`.