]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-issue-48962.stderr
Rollup merge of #106798 - scottmcm:signum-via-cmp, r=Mark-Simulacrum
[rust.git] / tests / ui / borrowck / borrowck-issue-48962.stderr
1 error[E0382]: use of moved value: `src`
2   --> $DIR/borrowck-issue-48962.rs:14:5
3    |
4 LL |     let mut src = &mut node;
5    |         ------- move occurs because `src` has type `&mut Node`, which does not implement the `Copy` trait
6 LL |     {src};
7    |      --- value moved here
8 LL |     src.next = None;
9    |     ^^^^^^^^ value used here after move
10
11 error[E0382]: use of moved value: `src`
12   --> $DIR/borrowck-issue-48962.rs:20:5
13    |
14 LL |     let mut src = &mut (22, 44);
15    |         ------- move occurs because `src` has type `&mut (i32, i32)`, which does not implement the `Copy` trait
16 LL |     {src};
17    |      --- value moved here
18 LL |     src.0 = 66;
19    |     ^^^^^^^^^^ value used here after move
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0382`.