@@ -131,7 +131,7 @@ pub enum CheckLintNameResult<'a> {
131
131
/// compiled with the tool and therefore the lint was never
132
132
/// added to the `LintStore`. Otherwise the `LintId` will be
133
133
/// 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 ) > > ) ,
135
135
}
136
136
137
137
impl LintStore {
@@ -384,7 +384,7 @@ impl LintStore {
384
384
} else {
385
385
// 2. The tool isn't currently running, so no lints will be registered.
386
386
// To avoid giving a false positive, ignore all unknown lints.
387
- CheckLintNameResult :: Tool ( Err ( ( None , String :: new ( ) ) ) )
387
+ CheckLintNameResult :: Tool ( Err ( None ) )
388
388
} ;
389
389
}
390
390
Some ( LintGroup { lint_ids, .. } ) => {
@@ -411,7 +411,7 @@ impl LintStore {
411
411
return if * silent {
412
412
CheckLintNameResult :: Ok ( lint_ids)
413
413
} else {
414
- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , ( * name) . to_string ( ) ) ) )
414
+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, ( * name) . to_string ( ) ) ) ) )
415
415
} ;
416
416
}
417
417
CheckLintNameResult :: Ok ( lint_ids)
@@ -473,16 +473,17 @@ impl LintStore {
473
473
if let Some ( LintAlias { name, silent } ) = depr {
474
474
let LintGroup { lint_ids, .. } = self . lint_groups . get ( name) . unwrap ( ) ;
475
475
return if * silent {
476
- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , complete_name) ) )
476
+ // njn: factor
477
+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, complete_name) ) ) )
477
478
} else {
478
- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , ( * name) . to_string ( ) ) ) )
479
+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, ( * name) . to_string ( ) ) ) ) )
479
480
} ;
480
481
}
481
- CheckLintNameResult :: Tool ( Err ( ( Some ( lint_ids) , complete_name) ) )
482
+ CheckLintNameResult :: Tool ( Err ( Some ( ( lint_ids, complete_name) ) ) )
482
483
}
483
484
} ,
484
485
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) ) ) )
486
487
}
487
488
Some ( other) => {
488
489
debug ! ( "got renamed lint {:?}" , other) ;
0 commit comments