fork/rust

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

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

master
831 B16 linesraw
1error[E0596]: cannot borrow `*container` as mutable, as it is behind a `&` reference
2  --> $DIR/issue-62387-suggest-iter-mut-2.rs:30:45
3   |
4LL |             vec.iter().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
5   |                                  ---------  ^^^^^^^^^ `container` is a `&` reference, so the data it refers to cannot be borrowed as mutable
6   |                                  |
7   |                                  consider changing this binding's type to be: `&mut Container`
8   |
9help: you may want to use `iter_mut` here
10   |
11LL |             vec.iter_mut().flat_map(|container| container.things()).cloned().collect::<Vec<PathBuf>>();
12   |                 ~~~~~~~~
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0596`.