@@ -131,7 +131,7 @@ pub enum CheckLintNameResult<'a> {
131131 /// compiled with the tool and therefore the lint was never
132132 /// added to the `LintStore`. Otherwise the `LintId` will be
133133 /// returned as if it where a rustc lint.
134- Tool ( Result < & ' a [ LintId ] , ( Option < & ' a [ LintId ] > , String ) > ) ,
134+ Tool ( Result < & ' a [ LintId ] , Option < ( & ' a [ LintId ] , String ) > > ) ,
135135}
136136
137137impl LintStore {
@@ -384,7 +384,7 @@ impl LintStore {
384384 } else {
385385 // 2. The tool isn't currently running, so no lints will be registered.
386386 // To avoid giving a false positive, ignore all unknown lints.
387- CheckLintNameResult :: Tool ( Err ( ( None , String :: new ( ) ) ) )
387+ CheckLintNameResult :: Tool ( Err ( None ) )
388388 } ;
389389 }
390390 Some ( LintGroup { lint_ids, .. } ) => {
@@ -411,7 +411,7 @@ impl LintStore {
411411 return if * silent {
412412 CheckLintNameResult :: Ok ( lint_ids)
413413 } else {
414- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , ( * name) . to_string ( ) ) ) )
414+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, ( * name) . to_string ( ) ) ) ) )
415415 } ;
416416 }
417417 CheckLintNameResult :: Ok ( lint_ids)
@@ -473,16 +473,17 @@ impl LintStore {
473473 if let Some ( LintAlias { name, silent } ) = depr {
474474 let LintGroup { lint_ids, .. } = self . lint_groups . get ( name) . unwrap ( ) ;
475475 return if * silent {
476- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , complete_name) ) )
476+ // njn: factor
477+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, complete_name) ) ) )
477478 } else {
478- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , ( * name) . to_string ( ) ) ) )
479+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, ( * name) . to_string ( ) ) ) ) )
479480 } ;
480481 }
481- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , complete_name) ) )
482+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, complete_name) ) ) )
482483 }
483484 } ,
484485 Some ( Id ( id) ) => {
485- CheckLintNameResult :: Tool ( Err ( ( Some ( slice:: from_ref ( id) ) , complete_name) ) )
486+ CheckLintNameResult :: Tool ( Err ( Some ( ( slice:: from_ref ( id) , complete_name) ) ) )
486487 }
487488 Some ( other) => {
488489 debug ! ( "got renamed lint {:?}" , other) ;
0 commit comments