]> git.lizzy.rs Git - rust.git/blob - src/test/ui/vec/vec-mut-iter-borrow.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / vec / vec-mut-iter-borrow.nll.stderr
1 error[E0499]: cannot borrow `xs` as mutable more than once at a time
2   --> $DIR/vec-mut-iter-borrow.rs:15:9
3    |
4 LL |     for x in &mut xs {
5    |              -------
6    |              |
7    |              first mutable borrow occurs here
8    |              borrow used here, in later iteration of loop
9 LL |         xs.push(1) //~ ERROR cannot borrow `xs`
10    |         ^^ second mutable borrow occurs here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0499`.