dangerous_implicit_autorefs
lint suggestion triggers clippy::needless_borrow
#140720
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
L-dangerous_implicit_autorefs
Lint: dangerous_implicit_autorefs
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Let's take the following example:
on current nightly, it triggers:
If the suggestion is applied, then clippy complains:
Curiously enough,
(*slice)[..].len()
also triggersdangerous_implicit_autorefs
, but the suggested(&(*slice))[..].len()
doesn't triggerclippy::needless_borrow
.The text was updated successfully, but these errors were encountered: