Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant E0106 missing lifetime error and rust_2018_idioms missing lifetime lint #63110

Closed
estebank opened this issue Jul 29, 2019 · 0 comments · Fixed by #90446
Closed

Redundant E0106 missing lifetime error and rust_2018_idioms missing lifetime lint #63110

estebank opened this issue Jul 29, 2019 · 0 comments · Fixed by #90446
Labels
A-diagnostics Area: Messages for errors, warnings, and lints 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-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

Comments

@estebank
Copy link
Contributor

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.

@estebank estebank added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-edition-2018-lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` labels Jul 29, 2019
@crlf0710 crlf0710 added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jun 11, 2020
@bors bors closed this as completed in 76938d6 Dec 2, 2021
@jieyouxu jieyouxu added the L-elided_lifetimes_in_paths Lint: elided_lifetimes_in_paths label Oct 15, 2024
@fmease fmease added A-edition-2018 Area: The 2018 edition and removed A-edition-2018-lints labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints 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-enhancement Category: An issue proposing an enhancement or a PR with one. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants