Files
rust/tests/ui/borrowck/borrowck-move-out-of-static-item.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
611 B
Plaintext
Raw Normal View History

error[E0507]: cannot move out of static item `BAR`
2024-03-13 00:02:45 +00:00
--> $DIR/borrowck-move-out-of-static-item.rs:16:10
2018-08-08 14:28:26 +02:00
|
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/borrowck-move-out-of-static-item.rs:3:1
|
LL | struct Foo {
| ^^^^^^^^^^ consider implementing `Clone` for this type
...
LL | test(BAR);
| --- you could clone this value
2018-08-08 14:28:26 +02:00
error: aborting due to 1 previous error
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0507`.