]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr
Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obk
[rust.git] / src / test / ui / moves / moves-based-on-type-no-recursive-stack-closure.stderr
1 error[E0499]: cannot borrow `*f` as mutable more than once at a time
2   --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:20:27
3    |
4 LL |                     (f.c)(f, true);
5    |                     ----- ^      - first borrow ends here
6    |                     |     |
7    |                     |     second mutable borrow occurs here
8    |                     first mutable borrow occurs here
9
10 error[E0382]: use of moved value: `f`
11   --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:32:5
12    |
13 LL |     let mut r = R {c: Box::new(f)};
14    |                                - value moved here
15 LL |     f(&mut r, false)
16    |     ^ value used here after move
17    |
18    = note: move occurs because `f` has type `F`, which does not implement the `Copy` trait
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0382, E0499.
23 For more information about an error, try `rustc --explain E0382`.