about summary refs log tree commit diff
path: root/tests/ui/static/static-items-cant-move.stderr
blob: 7c806613c5c04d21b6c882cdc2f005b4fae34a06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0507]: cannot move out of static item `BAR`
  --> $DIR/static-items-cant-move.rs:18:10
   |
LL |     test(BAR);
   |          ^^^ move occurs because `BAR` has type `Foo`, which does not implement the `Copy` trait
   |
note: if `Foo` implemented `Clone`, you could clone the value
  --> $DIR/static-items-cant-move.rs:5:1
   |
LL | struct Foo {
   | ^^^^^^^^^^ consider implementing `Clone` for this type
...
LL |     test(BAR);
   |          --- you could clone this value

error: aborting due to 1 previous error

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