Bad / misleading error message with auto deref and mutable borrows of multiple fields #32930
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
NLL-fixed-by-NLL
Bugs fixed, but only when NLL is enabled.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Consider (playpen):
Intuitively this should work since rust allows mutable borrows of disjoint fields however it does not because auto deref is involved.
The error message here is particularly bad / misleading for the
Box
case, in my opinion:First found on reddit.
The text was updated successfully, but these errors were encountered: