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

Errors reported in rustc_lint::levels::LintLevelsBuilder::push occurs multiple times #73301

Closed
crlf0710 opened this issue Jun 13, 2020 · 1 comment · Fixed by #119388
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@crlf0710
Copy link
Member

It seems errors (validation failures) reported from rustc_lint::levels::LintLevelsBuilder::push will occur multiple times. Examples are E0453 (not covered by tests) and E0763 (being added in #73300 , unit test reflecting this problem). I'm not sure what's the best way forward.

@crlf0710 crlf0710 added C-bug Category: This is a bug. 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. labels Jun 13, 2020
@Enselic
Copy link
Member

Enselic commented Dec 28, 2023

E0453 is actually covered by tests, it's just that its description contains an outdated error message. If you search for "incompatible with previous forbid" you will find the tests.

(I update the description of E0453 in #119388)

@bors bors closed this as completed in c8d4274 Dec 30, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Dec 30, 2023
Rollup merge of rust-lang#119388 - Enselic:prevent-lint-triplication, r=cjgillot

rustc_lint: Prevent triplication of various lints

Prevent triplication of various lints. The triplication happens because we run the same lint three times (or less in some cases):
* In `BuiltinCombinedPreExpansionLintPass`
* In `BuiltinCombinedEarlyLintPass`
* In `shallow_lint_levels_on()`

Only run the lints one time by checking the `lint_added_lints` bool.

Set your GitHub diff setting to ignore whitespaces changes when reviewing this PR, since I had to enclose a block inside an if.

Closes rust-lang#73301

(I found this while exploring the code related to [this](rust-lang#119251 (comment)) comment.)
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 C-bug Category: This is a bug. 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.

2 participants