Closed
Description
I'm happy to write up a full RFC for this, but I'd prefer to float the idea and understand if more contextual messages are a good thing. Inspired by my own experience in rust-lang/rust#43437, the message for two mutable borrows doesn't account for the case of loops - producing an error message that looks strange and doesn't really communicate what the borrow checker is having a problem with.
I'd like to change it so that the formatted message is changed based on it occuring inside a loop, similar to the use of moved value
error message, which specifies when the move occurs in a loop iteration.
The code is already written, in ivanbakel/rust@53fb2a5 .