FP with needless_pass_by_ref_mut
, async function and closures
#11610
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
needless_pass_by_ref_mut
lint is wrongfully emitted in some weird cases involvingasync
functions and closures.Note that #11551 was supposed to fix a similar issue, however the latest nightly still wrongfully emits a lint in the example below.
I did not debug it, but the lint seems to be extremely flaky, for example at one point during the minimization removing an unused
use
resulted in a lint not being emitted, at another point removing unused field caused a similar effect, but then removing another unused field brought the lint back...Lint Name
needless_pass_by_ref_mut
Reproducer
I tried this code:
(play)
I saw this happen:
I expected to see this happen: no warning,
v
is used mutably via.pop()
.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: