error message when trying to move from an Rc or Arc is ungreat #52086
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-NLL
Area: Non-lexical lifetimes (NLL)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
NLL-diagnostics
Working towards the "diagnostic parity" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
This example
gives this error:
That is confusing -- after all,
x
is not borrowed!The problem is that
Rc
only implementsDeref
, and hence we wind up lowering toDeref::deref(&x).field
, andderef
returns a&Bar
.We should probably say:
The text was updated successfully, but these errors were encountered: