mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-01 01:26:32 +00:00
added note/help about iterator invalidation when mutating a collection inside a for loop closes: rust-lang/rust#159489 when the borrow checker detects a mutable borrow of a collection that is also immutably borrowed by a for loop, this emits a note explaining that the for loop holds the borrow for its entire iteration, and a help message suggesting alternatives like index-based loops.