-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Combine all builtin early lints #57726
Conversation
@@ -1131,7 +1135,7 @@ where | |||
}); | |||
|
|||
time(sess, "early lint checks", || { | |||
lint::check_ast_crate(sess, &krate, false) | |||
lint::check_ast_crate(sess, &krate, false, rustc_lint::BuiltinCombinedEarlyLintPass::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the same instance used to register the lints. I don't think that matters for the lints in rustc though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue forward with this under the assumption that it will be ok.
3041cf5
to
cc755b7
Compare
This comment has been minimized.
This comment has been minimized.
cc755b7
to
5d3ad6c
Compare
@Zoxc you'll need to fix your tests. |
5d3ad6c
to
72743e4
Compare
…nts. Add a -Z no-interleave-lints option to allow benchmarking lints
72743e4
to
beb0c74
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
77ea610
to
9b5535a
Compare
I'll review this soon. |
@@ -60,6 +60,10 @@ declare_lint! { | |||
pub struct WhileTrue; | |||
|
|||
impl LintPass for WhileTrue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these look like they could use a macro.
This looks reasonable to me. @bors r+ |
📌 Commit 9b5535a has been approved by |
Combine all builtin early lints This also adds a -Z no-interleave-lints option to allow benchmarking lints. r? @estebank
☀️ Test successful - checks-travis, status-appveyor |
📣 Toolstate changed by #57726! Tested on commit ccd428b. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). |
Tested on commit rust-lang/rust@ccd428b. Direct link to PR: <rust-lang/rust#57726> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra).
rustup rustup rust-lang/rust#57907 and rust-lang/rust#57726 Fixes #3708
Changes: ```` wildcard_match_arm: Update lint count. wildcard_match_arm: add nesting issue to known. wildcard_match_arm: lint only enum matches. wildcard_match_arm: update ui test stderr wildcard_match_arm: format test. wilcard_match_arm: run rustfmt. wildcard_match_arm: add lint properly. wildcard_match_arm: rename function. wildcard_match_arm: add simple ui test. wildcard_match_arm: expand lint scope. Change match_wild lint name to WILDCARD_MATCH_ARM. Add match_wild lint (rust-lang#3649). fetch_prs_between: add .sh file ending cargo fmt Update various docs Use built-in entry_fn detection over self-built cargo fmt Reorganize conditionals: Run faster checks first Maybe fix ICE? Add initial version of const_fn lint Fix `unit_arg` false positive Rustfmt Check hypothetically failing conversion Remove tests for deprecated items Update more changed iterator paths Atomics constants are now handled by the deprecation lint Update changed iterator paths Update const slice processing update test stderr run cargo fmt rustup rust-lang#57907 Fix documentation for `slow_vector_initialization` rustup rust-lang#57726 Remove unsafe_vector_initialization from added lints Prevent incorrect cast_lossless suggestion in const_fn Incorporate review suggestions Fix dogfood tests on Appveyor test(versioncheck): Use .no_deps() test(versioncheck): Fix version equality check chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1 dependencies: update itertools from 0.7 to 0.8 Add script to fetch GitHub PRs between two commits gitattributes: Treat .fixed files as rust files Update changelog with all changes since 0.0.212 Fix `expect_fun_call` lint suggestions ````
submodules: update clippy from f175352 to 6ce78d1 Should fix clippy toolstate Changes: ```` wildcard_match_arm: Update lint count. wildcard_match_arm: add nesting issue to known. wildcard_match_arm: lint only enum matches. wildcard_match_arm: update ui test stderr wildcard_match_arm: format test. wilcard_match_arm: run rustfmt. wildcard_match_arm: add lint properly. wildcard_match_arm: rename function. wildcard_match_arm: add simple ui test. wildcard_match_arm: expand lint scope. Change match_wild lint name to WILDCARD_MATCH_ARM. Add match_wild lint (#3649). fetch_prs_between: add .sh file ending cargo fmt Update various docs Use built-in entry_fn detection over self-built cargo fmt Reorganize conditionals: Run faster checks first Maybe fix ICE? Add initial version of const_fn lint Fix `unit_arg` false positive Rustfmt Check hypothetically failing conversion Remove tests for deprecated items Update more changed iterator paths Atomics constants are now handled by the deprecation lint Update changed iterator paths Update const slice processing update test stderr run cargo fmt rustup #57907 Fix documentation for `slow_vector_initialization` rustup #57726 Remove unsafe_vector_initialization from added lints Prevent incorrect cast_lossless suggestion in const_fn Incorporate review suggestions Fix dogfood tests on Appveyor test(versioncheck): Use .no_deps() test(versioncheck): Fix version equality check chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1 dependencies: update itertools from 0.7 to 0.8 Add script to fetch GitHub PRs between two commits gitattributes: Treat .fixed files as rust files Update changelog with all changes since 0.0.212 Fix `expect_fun_call` lint suggestions ```` r? @oli-obk
Changes: ```` wildcard_match_arm: Update lint count. wildcard_match_arm: add nesting issue to known. wildcard_match_arm: lint only enum matches. wildcard_match_arm: update ui test stderr wildcard_match_arm: format test. wilcard_match_arm: run rustfmt. wildcard_match_arm: add lint properly. wildcard_match_arm: rename function. wildcard_match_arm: add simple ui test. wildcard_match_arm: expand lint scope. Change match_wild lint name to WILDCARD_MATCH_ARM. Add match_wild lint (rust-lang#3649). fetch_prs_between: add .sh file ending cargo fmt Update various docs Use built-in entry_fn detection over self-built cargo fmt Reorganize conditionals: Run faster checks first Maybe fix ICE? Add initial version of const_fn lint Fix `unit_arg` false positive Rustfmt Check hypothetically failing conversion Remove tests for deprecated items Update more changed iterator paths Atomics constants are now handled by the deprecation lint Update changed iterator paths Update const slice processing update test stderr run cargo fmt rustup rust-lang/rust#57907 Fix documentation for `slow_vector_initialization` rustup rust-lang/rust#57726 Remove unsafe_vector_initialization from added lints Prevent incorrect cast_lossless suggestion in const_fn Incorporate review suggestions Fix dogfood tests on Appveyor test(versioncheck): Use .no_deps() test(versioncheck): Fix version equality check chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1 dependencies: update itertools from 0.7 to 0.8 Add script to fetch GitHub PRs between two commits gitattributes: Treat .fixed files as rust files Update changelog with all changes since 0.0.212 Fix `expect_fun_call` lint suggestions ````
Clean up some comments on lint implementation This updates some doc comments that have gotten very out of date. Some of these macros were removed or renamed in rust-lang#57726 and rust-lang#104863 and others. Manual emitting of lints was significantly reworked when the `Diagnostic` infrastructure was added. Rather than try to replicate the high-level documentation, I added pointers to the rustc-dev-guide. I linkified some types so that if they are renamed/removed without updating the docs, it will break CI.
Clean up some comments on lint implementation This updates some doc comments that have gotten very out of date. Some of these macros were removed or renamed in rust-lang#57726 and rust-lang#104863 and others. Manual emitting of lints was significantly reworked when the `Diagnostic` infrastructure was added. Rather than try to replicate the high-level documentation, I added pointers to the rustc-dev-guide. I linkified some types so that if they are renamed/removed without updating the docs, it will break CI.
Rollup merge of rust-lang#132221 - ehuss:lint-docs, r=compiler-errors Clean up some comments on lint implementation This updates some doc comments that have gotten very out of date. Some of these macros were removed or renamed in rust-lang#57726 and rust-lang#104863 and others. Manual emitting of lints was significantly reworked when the `Diagnostic` infrastructure was added. Rather than try to replicate the high-level documentation, I added pointers to the rustc-dev-guide. I linkified some types so that if they are renamed/removed without updating the docs, it will break CI.
This also adds a -Z no-interleave-lints option to allow benchmarking lints.
r? @estebank