2018 idioms: duplicate suggestion for anonymous lifetime #55768
Labels
A-edition-2018
Area: The 2018 edition
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
L-elided_lifetimes_in_paths
Lint: elided_lifetimes_in_paths
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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 fix
attempts to apply the fix twice, creating invalid<'_><'_>
syntax.It's not clear whether it's best to fix this in
cargo fix
or 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.The text was updated successfully, but these errors were encountered: