-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
dangerous_implicit_autorefs suggestion is wrong #140721
Copy link
Copy link
Closed as not planned
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.L-dangerous_implicit_autorefsLint: dangerous_implicit_autorefsLint: dangerous_implicit_autorefsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.L-dangerous_implicit_autorefsLint: dangerous_implicit_autorefsLint: dangerous_implicit_autorefsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
The following code:
gives the two following warnings
I the first warning is quite a duplicate of the second one, and its suggestion is also wrong, as
(&(*slice)[..]).len()would still trigger the warning.See also: