@@ -179,6 +179,14 @@ mod reexport {
179
179
crate use syntax:: ast:: { Name , NodeId } ;
180
180
}
181
181
182
+ pub fn register_pre_expansion_lints ( session : & rustc:: session:: Session , store : & mut rustc:: lint:: LintStore , conf : & Conf ) {
183
+ store. register_pre_expansion_pass ( Some ( session) , box write:: Pass ) ;
184
+ store. register_pre_expansion_pass ( Some ( session) , box redundant_field_names:: RedundantFieldNames ) ;
185
+ store. register_pre_expansion_pass ( Some ( session) , box non_expressive_names:: NonExpressiveNames {
186
+ single_char_binding_names_threshold : conf. single_char_binding_names_threshold ,
187
+ } ) ;
188
+ }
189
+
182
190
pub fn read_conf ( reg : & rustc_plugin:: Registry < ' _ > ) -> Conf {
183
191
match utils:: conf:: file_from_args ( reg. args ( ) ) {
184
192
Ok ( file_name) => {
@@ -225,14 +233,6 @@ pub fn read_conf(reg: &rustc_plugin::Registry<'_>) -> Conf {
225
233
}
226
234
}
227
235
228
- pub fn register_pre_expansion_lints ( session : & rustc:: session:: Session , store : & mut rustc:: lint:: LintStore , conf : & Conf ) {
229
- store. register_pre_expansion_pass ( Some ( session) , box write:: Pass ) ;
230
- store. register_pre_expansion_pass ( Some ( session) , box redundant_field_names:: RedundantFieldNames ) ;
231
- store. register_pre_expansion_pass ( Some ( session) , box non_expressive_names:: NonExpressiveNames {
232
- single_char_binding_names_threshold : conf. single_char_binding_names_threshold ,
233
- } ) ;
234
- }
235
-
236
236
#[ rustfmt:: skip]
237
237
pub fn register_plugins ( reg : & mut rustc_plugin:: Registry < ' _ > , conf : & Conf ) {
238
238
let mut store = reg. sess . lint_store . borrow_mut ( ) ;
0 commit comments