assigning to immutable argument produces a confusing error #46659
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-diagnostics
Working group: Diagnostics
This program:
produces this error:
I consider this a somewhat confusing error. I think it should rather be:
perhaps with a suggestion or something.
This error is issued by the borrow checker, so to do this right we should also modify the MIR-based borrow checker.
The text was updated successfully, but these errors were encountered: