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