Whose Error Is It?

Rust printed this

error[E0499]: cannot borrow `v` as mutable more than once at a time
What it meansThe borrow checker found two mutable references to v alive at the same time, which Rust forbids to prevent data races and aliasing.
The first thing to checkOften a mutable reference is held across a loop or a second call; shorten the first borrow's scope, or use indices or split_at_mut instead.

More from Rust

All 75 errors

Whose Error Is It? · Status Menu · Back to the bar