explicit_auto_deref
gives wrong suggestion when using Arc
#9310
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I have some weird looking code which has a reborrow pattern for reasons I don’t understand but which seem to be wrong anyways: It uses
&*arc
to turn anArc<T>
into a&T
, which is weird but the rustc compiler never seemed to mind.Clippy now suggests to remove the
&*
entirely, which seems wrong.Lint Name
explicit_auto_deref
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
It should suggest using just
&arc
, as I still need to borrow it to be able to deref.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: