about summary refs log tree commit diff
path: root/tests/ui/suggestions/non_copy_move_out_of_tuple.stderr
blob: 62f24324fcc174b6ad9183f984bc68debdaf5fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error[E0507]: cannot move out of `tuple.0` which is behind a shared reference
  --> $DIR/non_copy_move_out_of_tuple.rs:7:12
   |
LL |     (b,) = *tuple;
   |      -     ^^^^^^
   |      |
   |      data moved here
   |      move occurs because the place has type `NonCopy`, which does not implement the `Copy` trait
   |
note: if `NonCopy` implemented `Clone`, you could clone the value
  --> $DIR/non_copy_move_out_of_tuple.rs:3:1
   |
LL | struct NonCopy;
   | ^^^^^^^^^^^^^^ consider implementing `Clone` for this type
...
LL |     (b,) = *tuple;
   |      - you could clone this value
help: consider removing the dereference here
   |
LL -     (b,) = *tuple;
LL +     (b,) = tuple;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0507`.