fork/rust

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

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

master
772 B20 linesraw
1error[E0382]: use of moved value: `r`
2  --> $DIR/pin-mut-reborrow-infer-var-issue-107419.rs:10:9
3   |
4LL |     let mut r = Pin::new(&mut uwu);
5   |         ----- move occurs because `r` has type `Pin<&mut ()>`, which does not implement the `Copy` trait
6LL |     foo(r.get_mut());
7   |           --------- `r` moved due to this method call
8LL |     foo(r.get_mut());
9   |         ^ value used here after move
10   |
11note: `Pin::<&'a mut T>::get_mut` takes ownership of the receiver `self`, which moves `r`
12  --> $SRC_DIR/core/src/pin.rs:LL:COL
13help: consider reborrowing the `Pin` instead of moving it
14   |
15LL |     foo(r.as_mut().get_mut());
16   |          +++++++++
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0382`.