]> git.lizzy.rs Git - rust.git/blob - src/test/ui/use/use-after-move-self-based-on-type.nll.stderr
Auto merge of #57714 - matthewjasper:wellformed-unreachable, r=pnkfelix
[rust.git] / src / test / ui / use / use-after-move-self-based-on-type.nll.stderr
1 error[E0382]: use of moved value: `self`
2   --> $DIR/use-after-move-self-based-on-type.rs:12:16
3    |
4 LL |     pub fn foo(self) -> isize {
5    |                ---- move occurs because `self` has type `S`, which does not implement the `Copy` trait
6 LL |         self.bar();
7    |         ---- value moved here
8 LL |         return self.x;  //~ ERROR use of moved value: `self.x`
9    |                ^^^^^^ value used here after move
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0382`.