document for E0502 insufficiently general #126495
Labels
A-borrow-checker
Area: The borrow checker
A-diagnostics
Area: Messages for errors, warnings, and lints
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Location
Location is E0502.md, the explanation for Error code E0502
https://github.com/rust-lang/rust/blob/master/compiler/rustc_error_codes/src/error_codes/E0502.md
online version: https://doc.rust-lang.org/error_codes/E0502.html
Summary
The doc explains E0502 as follows:
However, E0502 is also emitted when a variable already borrowed as mutable was borrowed as immutable. E.g. see line 1 and 13 in this file
So it seems a more general explanation might be advisable that covers (at least) both types of cases.
The text was updated successfully, but these errors were encountered: