File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ impl LintStore {
297297 self . by_name . insert ( name. into ( ) , Removed ( reason. into ( ) ) ) ;
298298 }
299299
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 > {
301301 match self . by_name . get ( lint_name) {
302302 Some ( & Id ( lint_id) ) => Ok ( vec ! [ lint_id] ) ,
303303 Some ( & Renamed ( _, lint_id) ) => {
@@ -307,9 +307,17 @@ impl LintStore {
307307 Err ( FindLintError :: Removed )
308308 } ,
309309 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+ } ;
313321 }
314322 }
315323 }
You can’t perform that action at this time.
0 commit comments