]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | error[E0505]: cannot move out of `v` because it is borrowed |
2 | --> $DIR/issue-97381.rs:26:14 | |
3 | | | |
9ffffee4 FG |
4 | LL | let v = [1, 2, 3] |
5 | | - binding `v` declared here | |
6 | ... | |
923072b8 FG |
7 | LL | let el = &v[0]; |
8 | | - borrow of `v` occurs here | |
9 | LL | | |
10 | LL | for _ in v { | |
11 | | ^ move out of `v` occurs here | |
12 | LL | | |
13 | LL | println!("{}", ***el > 0); | |
14 | | ---- borrow later used here | |
15 | ||
16 | error: aborting due to previous error | |
17 | ||
18 | For more information about this error, try `rustc --explain E0505`. |