File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ impl LintStore {
297
297
self . by_name . insert ( name. into ( ) , Removed ( reason. into ( ) ) ) ;
298
298
}
299
299
300
- pub fn find_lints ( & self , lint_name : & str ) -> Result < Vec < LintId > , FindLintError > {
300
+ pub fn find_lints ( & self , mut lint_name : & str ) -> Result < Vec < LintId > , FindLintError > {
301
301
match self . by_name . get ( lint_name) {
302
302
Some ( & Id ( lint_id) ) => Ok ( vec ! [ lint_id] ) ,
303
303
Some ( & Renamed ( _, lint_id) ) => {
@@ -307,9 +307,17 @@ impl LintStore {
307
307
Err ( FindLintError :: Removed )
308
308
} ,
309
309
None => {
310
- match self . lint_groups . get ( lint_name) {
311
- Some ( v) => Ok ( v. 0 . clone ( ) ) ,
312
- None => Err ( FindLintError :: Removed )
310
+ loop {
311
+ return match self . lint_groups . get ( lint_name) {
312
+ Some ( ( ids, _, depr) ) => {
313
+ if let Some ( ( name, _) ) = depr {
314
+ lint_name = name;
315
+ continue ;
316
+ }
317
+ Ok ( ids. clone ( ) )
318
+ }
319
+ None => Err ( FindLintError :: Removed )
320
+ } ;
313
321
}
314
322
}
315
323
}
You can’t perform that action at this time.
0 commit comments