Commit cc51d03
authored
Rollup merge of rust-lang#68045 - Centril:liberate-lints, r=Mark-Simulacrum
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`.File tree
48 files changed
+974
-1017
lines changed- src
- librustc_ast_lowering
- librustc_ast_passes
- librustc_driver
- librustc_interface
- librustc_lint
- librustc_mir/transform
- librustc_passes
- librustc_plugin_impl
- librustc_span
- librustc
- hir
- lint
- middle
- mir/interpret
- query
- traits
- specialize
- ty
- query
- librustdoc
- test/ui-fulldeps/auxiliary
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+974
-1017
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3663 | 3663 | | |
3664 | 3664 | | |
3665 | 3665 | | |
| 3666 | + | |
3666 | 3667 | | |
3667 | 3668 | | |
3668 | 3669 | | |
| |||
3788 | 3789 | | |
3789 | 3790 | | |
3790 | 3791 | | |
| 3792 | + | |
3791 | 3793 | | |
3792 | 3794 | | |
3793 | 3795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
0 commit comments