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 @@ -289,6 +289,26 @@ impl LintStore {
289
289
self . by_name . insert ( old_name. to_string ( ) , Renamed ( new_name. to_string ( ) , target) ) ;
290
290
}
291
291
292
+ #[ track_caller]
293
+ pub fn register_renamed_group ( & mut self , old_name : & ' static str , new_name : & ' static str ) {
294
+ let prev_lint = self . lint_groups . insert (
295
+ old_name,
296
+ LintGroup {
297
+ lint_ids : vec ! [ ] ,
298
+ is_externally_loaded : false ,
299
+ depr : Some ( LintAlias { name : new_name, silent : false } ) ,
300
+ } ,
301
+ ) ;
302
+
303
+ if prev_lint. is_some ( ) {
304
+ bug ! ( "The lint group {old_name} has already been registered" ) ;
305
+ }
306
+
307
+ if !self . lint_groups . contains_key ( new_name) {
308
+ bug ! ( "The lint group {new_name} has not been registered" ) ;
309
+ }
310
+ }
311
+
292
312
pub fn register_removed ( & mut self , name : & str , reason : & str ) {
293
313
self . by_name . insert ( name. into ( ) , Removed ( reason. into ( ) ) ) ;
294
314
}
You can’t perform that action at this time.
0 commit comments