granite-rust/src/test/ui/use/use-after-move-self.stderr

14 lines
483 B
Text
Raw Normal View History

error[E0382]: use of moved value: `self`
2018-12-25 08:56:47 -07:00
--> $DIR/use-after-move-self.rs:10:16
2018-08-08 14:28:26 +02:00
|
LL | pub fn foo(self) -> isize {
| ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
2018-08-08 14:28:26 +02:00
LL | self.bar();
| ---- value moved here
2019-03-09 15:03:44 +03:00
LL | return *self.x;
2018-08-08 14:28:26 +02:00
| ^^^^^^^ value used here after move
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.