File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,26 @@ impl LintStore {
299
299
self . by_name . insert ( old_name. to_string ( ) , Renamed ( new_name. to_string ( ) , target) ) ;
300
300
}
301
301
302
+ #[ track_caller]
303
+ pub fn register_renamed_group ( & mut self , old_name : & ' static str , new_name : & ' static str ) {
304
+ let prev_lint = self . lint_groups . insert (
305
+ old_name,
306
+ LintGroup {
307
+ lint_ids : vec ! [ ] ,
308
+ is_loaded : false ,
309
+ depr : Some ( LintAlias { name : new_name, silent : false } ) ,
310
+ } ,
311
+ ) ;
312
+
313
+ if prev_lint. is_some ( ) {
314
+ bug ! ( "The lint group {old_name} has already been registered" ) ;
315
+ }
316
+
317
+ if !self . lint_groups . contains_key ( new_name) {
318
+ bug ! ( "The lint group {new_name} has not been registered" ) ;
319
+ }
320
+ }
321
+
302
322
pub fn register_removed ( & mut self , name : & str , reason : & str ) {
303
323
self . by_name . insert ( name. into ( ) , Removed ( reason. into ( ) ) ) ;
304
324
}
You can’t perform that action at this time.
0 commit comments