fork/rust

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

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

master
619 B17 linesraw
1error[E0597]: `line` does not live long enough
2  --> $DIR/issue-52126-assign-op-invariance.rs:34:28
3   |
4LL |     for line in vec!["123456789".to_string(), "12345678".to_string()] {
5   |         ---- binding `line` declared here
6LL |         let v: Vec<&str> = line.split_whitespace().collect();
7   |                            ^^^^ borrowed value does not live long enough
8...
9LL |         acc += cnt2;
10   |         --- borrow later used here
11...
12LL |     }
13   |     - `line` dropped here while still borrowed
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0597`.