]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/vec-mut-iter-borrow.stderr
Optimize `TyKind::eq`.
[rust.git] / tests / ui / array-slice-vec / vec-mut-iter-borrow.stderr
1 error[E0499]: cannot borrow `xs` as mutable more than once at a time
2   --> $DIR/vec-mut-iter-borrow.rs:5:9
3    |
4 LL |     for x in &mut xs {
5    |              -------
6    |              |
7    |              first mutable borrow occurs here
8    |              first borrow later used here
9 LL |         xs.push(1)
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`.