fork/rust

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

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

master
817 B18 linesraw
1error[E0507]: cannot move out of an `Rc`
2  --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:4:14
3   |
4LL |     let _x = Rc::new(vec![1, 2]).into_iter();
5   |              ^^^^^^^^^^^^^^^^^^^ ----------- value moved due to this method call
6   |              |
7   |              move occurs because value has type `Vec<i32>`, which does not implement the `Copy` trait
8   |
9note: `into_iter` takes ownership of the receiver `self`, which moves value
10  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
11help: you can `clone` the value and consume it, but this might not be your desired behavior
12   |
13LL |     let _x = Rc::new(vec![1, 2]).clone().into_iter();
14   |                                 ++++++++
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0507`.