needless_borrow emitted on expression that changes types when &
is removed
#14352
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
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
The error after
clippy --fix
, this should compile in my opinion. It does compile without the curly braces aroundguard
. It is not a clippy false positive if this is considered a rustc bug.Lint Name
needless_borrow
Reproducer
I tried this code:
I saw this happen:
"failed to automatically apply fixes suggested by rustc"
I expected to see this happen:
I expected the result after
clippy --fix
to compileVersion
Additional Labels
@rustbot label I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: