Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up2018 idioms: duplicate suggestion for anonymous lifetime #55768
Comments
alexcrichton
added
the
A-edition-2018-lints
label
Nov 7, 2018
alexcrichton
referenced this issue
Nov 7, 2018
Closed
cargo fix --edition-idioms: "failed to automatically apply fixes suggested by rustc to crate" #6273
This comment has been minimized.
This comment has been minimized.
|
I think we could use the session's one-time diagnostics functionality to de-duplicate just the suggestion? (I assume this would require stripping expansion info from the spans.) If this is a good idea, it might also generalize to other lints ... |
ehuss
referenced this issue
Nov 28, 2018
Closed
'cargo fix --edition-idioms': more fun macro problems with anonymous lifetimes #6361
This was referenced Dec 14, 2018
ehuss
referenced this issue
Dec 30, 2018
Closed
cargo fix --edition-idioms tackles macro twice #57211
alexcrichton
added
the
A-suggestion-diagnostics
label
Jan 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alexcrichton commentedNov 7, 2018
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.