A variable was borrowed with one mutability while an active borrow of the opposite mutability still exists. Rust does not permit a mutable borrow to coexist with any other borrow of the same value.
E0502
rust A variable was borrowed with one mutability while an active borrow of the opposite mutability still exists. Rust does not permit a mutable borrow to coexist with any other borrow of the same value.