fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0382]: use of moved value: `orig` 2 --> $DIR/issue-64559.rs:4:20 3 | 4LL | let orig = vec![true]; 5 | ---- move occurs because `orig` has type `Vec<bool>`, which does not implement the `Copy` trait 6LL | for _val in orig {} 7 | ---- `orig` moved due to this implicit call to `.into_iter()` 8LL | let _closure = || orig; 9 | ^^ ---- use occurs due to use in closure 10 | | 11 | value used here after move 12 | 13note: `into_iter` takes ownership of the receiver `self`, which moves `orig` 14 --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL 15help: consider iterating over a slice of the `Vec<bool>`'s content to avoid moving into the `for` loop 16 | 17LL | for _val in &orig {} 18 | + 19 20error: aborting due to previous error 21 22For more information about this error, try `rustc --explain E0382`.