]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-issue-2657-2.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-issue-2657-2.stderr
1 error[E0507]: cannot move out of `*y` which is behind a shared reference
2   --> $DIR/borrowck-issue-2657-2.rs:8:18
3    |
4 LL |         let _b = *y;
5    |                  ^^ move occurs because `*y` has type `Box<i32>`, which does not implement the `Copy` trait
6    |
7 help: consider removing the dereference here
8    |
9 LL -         let _b = *y;
10 LL +         let _b = y;
11    |
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0507`.