-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
Description
While hacking in the compiler I got the following error:
error: hidden lifetime parameters in types are deprecated
--> src/libsyntax_ext/format.rs:113:43
|
113 | arg_with_formatting_spans: Vec<(Span, parse::FormatSpec)>,
| ^^^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`
|
note: lint level defined here
--> src/libsyntax_ext/lib.rs:5:9
|
5 | #![deny(rust_2018_idioms)]
| ^^^^^^^^^^^^^^^^
= note: #[deny(elided_lifetimes_in_paths)] implied by #[deny(rust_2018_idioms)]
error[E0106]: missing lifetime specifier
--> src/libsyntax_ext/format.rs:113:43
|
113 | arg_with_formatting_spans: Vec<(Span, parse::FormatSpec)>,
| ^^^^^^^^^^^^^^^^^ expected lifetime parameter
The errors are correct (and the lint is even helpful!) but they are 1) redundant and 2) E0106 is not as helpful as the rust_2018_idioms
lint. We should get them both to parity and hide one if the other has triggered.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.