]> git.lizzy.rs Git - rust.git/blob - src/test/ui/codemap_tests/tab_3.stderr
Rollup merge of #104849 - GuillaumeGomez:source-code-sidebar-css-migration, r=notriddle
[rust.git] / src / test / ui / codemap_tests / tab_3.stderr
1 error[E0382]: borrow of moved value: `some_vec`
2   --> $DIR/tab_3.rs:7:20
3    |
4 LL |     let some_vec = vec!["hi"];
5    |         -------- move occurs because `some_vec` has type `Vec<&str>`, which does not implement the `Copy` trait
6 LL |     some_vec.into_iter();
7    |              ----------- `some_vec` moved due to this method call
8 LL |     {
9 LL |         println!("{:?}", some_vec);
10    |                          ^^^^^^^^ value borrowed here after move
11    |
12 note: this function takes ownership of the receiver `self`, which moves `some_vec`
13   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
14    |
15 LL |     fn into_iter(self) -> Self::IntoIter;
16    |                  ^^^^
17    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
18 help: consider cloning the value if the performance cost is acceptable
19    |
20 LL |     some_vec.clone().into_iter();
21    |             ++++++++
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0382`.