File tree 2 files changed +6
-13
lines changed
compiler/rustc_interface/src
2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,6 @@ fn count_nodes(krate: &ast::Crate) -> usize {
72
72
counter. count
73
73
}
74
74
75
- pub ( crate ) fn create_lint_store (
76
- sess : & Session ,
77
- register_lints : Option < impl Fn ( & Session , & mut LintStore ) > ,
78
- ) -> LintStore {
79
- let mut lint_store = rustc_lint:: new_lint_store ( sess. enable_internal_lints ( ) ) ;
80
- if let Some ( register_lints) = register_lints {
81
- register_lints ( sess, & mut lint_store) ;
82
- }
83
- lint_store
84
- }
85
-
86
75
fn pre_expansion_lint < ' a > (
87
76
sess : & Session ,
88
77
features : & Features ,
Original file line number Diff line number Diff line change @@ -148,8 +148,12 @@ impl<'tcx> Queries<'tcx> {
148
148
) ;
149
149
let dep_graph = setup_dep_graph ( sess, crate_name, stable_crate_id) ?;
150
150
151
- let lint_store =
152
- Lrc :: new ( passes:: create_lint_store ( sess, self . compiler . register_lints . as_deref ( ) ) ) ;
151
+ let mut lint_store = rustc_lint:: new_lint_store ( sess. enable_internal_lints ( ) ) ;
152
+ if let Some ( register_lints) = self . compiler . register_lints . as_deref ( ) {
153
+ register_lints ( sess, & mut lint_store) ;
154
+ }
155
+ let lint_store = Lrc :: new ( lint_store) ;
156
+
153
157
let cstore = FreezeLock :: new ( Box :: new ( CStore :: new (
154
158
self . codegen_backend ( ) . metadata_loader ( ) ,
155
159
stable_crate_id,
You can’t perform that action at this time.
0 commit comments