Move more of rustc::lint into rustc_lint#68045
Merged
bors merged 14 commits intorust-lang:masterfrom Jan 12, 2020
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
56e2c47 to
9e9b615
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d288c66 to
b980596
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9297562 to
bc1c936
Compare
Also do some cleanup of the interface.
bc1c936 to
51078ce
Compare
Contributor
Author
|
This is ready for review now. |
Member
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
Changes look good.
It'd be helpful to include a description of the new/old crate deps in the PR description I think, but not critical (would help me understand exactly how things have moved at a high level).
Contributor
Author
|
Added a PR description. :) @bors r=Mark-Simulacrum |
Collaborator
|
📌 Commit 51078ce has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Jan 11, 2020
…lacrum Move more of `rustc::lint` into `rustc_lint` Based on rust-lang#67806. Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes: - We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`. - `in_derive_expansion` is, and needs to, be moved as a method on `Span`. - We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined. - `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after rust-lang#68133). - `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints. - `rustc::context` is moved to `rustc_lint::context`. - The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jan 11, 2020
…lacrum Move more of `rustc::lint` into `rustc_lint` Based on rust-lang#67806. Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes: - We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`. - `in_derive_expansion` is, and needs to, be moved as a method on `Span`. - We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined. - `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after rust-lang#68133). - `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints. - `rustc::lint::context` is moved to `rustc_lint::context`. - The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
Centril
added a commit
to Centril/rust
that referenced
this pull request
Jan 12, 2020
…lacrum Move more of `rustc::lint` into `rustc_lint` Based on rust-lang#67806. Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes: - We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`. - `in_derive_expansion` is, and needs to, be moved as a method on `Span`. - We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined. - `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after rust-lang#68133). - `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints. - `rustc::lint::context` is moved to `rustc_lint::context`. - The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
bors
added a commit
that referenced
this pull request
Jan 12, 2020
Rollup of 6 pull requests Successful merges: - #67494 (Constify more of alloc::Layout) - #67867 (Correctly check for opaque types in `assoc_ty_def`) - #67948 (Galloping search for binary_search_util) - #68045 (Move more of `rustc::lint` into `rustc_lint`) - #68089 (Unstabilize `Vec::remove_item`) - #68108 (Add suggestions when encountering chained comparisons) Failed merges: r? @ghost
JohnTitor
added a commit
to JohnTitor/rust-clippy
that referenced
this pull request
Jan 12, 2020
JohnTitor
reviewed
Jan 12, 2020
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Jan 13, 2020
Rustup to rust-lang/rust#68045 This is blocked because `rustc_lint::context` is not pub module and `CheckLintNameResult` is not marked as `pub use`. changelog: none
JohnTitor
added a commit
to JohnTitor/rust-clippy
that referenced
this pull request
Jan 13, 2020
JohnTitor
added a commit
to JohnTitor/rust-clippy
that referenced
this pull request
Jan 13, 2020
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Jan 13, 2020
Rustup to rust-lang/rust#68045 This is blocked because `rustc_lint::context` is not pub module and `CheckLintNameResult` is not marked as `pub use`. changelog: none
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #67806.
Here we try to consolidate more of the linting infra into
rustc::lint. Some high-level notes:We now store an
Lrc<dyn Any + Send + Sync>as opposed toLrc<LintStore>in theGlobalCtxt. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things fromrustc::linttorustc_lint.in_derive_expansionis, and needs to, be moved as a method onSpan.We reduce the number of ways on
tcxto emit a lint so that the developer UX is more streamlined.LintLevelsBuilderis moved torustc_lint::levels, leaving behindLintLevelMap/Setin a purified form due to current constraints (hopefully fixable in the future after Slimmer syntax #68133).struct_lint_levelis moved torustc::lintdue to current dependency constraints.rustc::lint::contextis moved torustc_lint::context.The visitors in
rustc::lintare moved torustc_lint::passes.