]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-51415.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / borrowck / issue-51415.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/issue-51415.rs:16:42
3    |
4 LL |     let opt = a.iter().enumerate().find(|(_, &s)| {
5    |                                          ^^^^^-^
6    |                                          |    |
7    |                                          |    data moved here
8    |                                          cannot move out of borrowed content
9    |
10 note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
11   --> $DIR/issue-51415.rs:16:47
12    |
13 LL |     let opt = a.iter().enumerate().find(|(_, &s)| {
14    |                                               ^
15
16 error[E0507]: cannot move out of data in a `&` reference
17   --> $DIR/issue-51415.rs:16:47
18    |
19 LL |     let opt = a.iter().enumerate().find(|(_, &s)| {
20    |                                               ^
21    |                                               |
22    |                                               cannot move out of data in a `&` reference
23    |                                               cannot move
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0507`.