-
-
Notifications
You must be signed in to change notification settings - Fork 15k
2018 idioms: duplicate suggestion for anonymous lifetime #55768
Copy link
Copy link
Closed
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsT-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.
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.L-elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsLint: elided_lifetimes_in_pathsT-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
First reported here this code:
when compiled yields two warnings to insert anonymous lifetimes. While we as humans can figure this out pretty well, Cargo as a merciless program can't figure this out and
cargo fixattempts to apply the fix twice, creating invalid<'_><'_>syntax.It's not clear whether it's best to fix this in
cargo fixor fix this in the compiler itself. I figure it's easiest to track all idiom-lint related issues in this repository though, so I've opted to move it over here.