fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
779 B23 linesraw
1error[E0382]: use of moved value: `foo`
2  --> $DIR/pin-mut-reborrow.rs:14:5
3   |
4LL |     let mut foo = Pin::new(&mut foo);
5   |         ------- move occurs because `foo` has type `Pin<&mut Foo>`, which does not implement the `Copy` trait
6LL |     foo.foo();
7   |         ----- `foo` moved due to this method call
8LL |     foo.foo();
9   |     ^^^ value used here after move
10   |
11note: `Foo::foo` takes ownership of the receiver `self`, which moves `foo`
12  --> $DIR/pin-mut-reborrow.rs:7:12
13   |
14LL |     fn foo(self: Pin<&mut Self>) {}
15   |            ^^^^
16help: consider reborrowing the `Pin` instead of moving it
17   |
18LL |     foo.as_mut().foo();
19   |        +++++++++
20
21error: aborting due to previous error
22
23For more information about this error, try `rustc --explain E0382`.