Incorrect "in later iteration of loop" error diagnostic #56785
Labels
A-borrow-checker
Area: The borrow checker
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
NLL-diagnostics
Working towards the "diagnostic parity" goal
The 2018 edition adds an incorrect "in later iteration of loop" qualifier to the borrow checker error message if an issues occurs within a loop.
Repro code:
Playground Link
Actual Output:
Expected Output:
The error message should not say in later iteration of loop since the use occurs in the same iteration of the loop as both borrows. The value and the reference do not survive between loop iterations.
Rust version: stable (1.31.0)
The text was updated successfully, but these errors were encountered: