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