@@ -344,9 +344,9 @@ impl LintStore {
344
344
level : Level ,
345
345
crate_attrs : & [ ast:: Attribute ] ,
346
346
) {
347
- let ( tool_name, lint_name ) = parse_lint_and_tool_name ( lint_name) ;
347
+ let ( tool_name, lint_name_only ) = parse_lint_and_tool_name ( lint_name) ;
348
348
349
- let db = match self . check_lint_and_tool_name ( sess, tool_name , lint_name , crate_attrs) {
349
+ let db = match self . check_lint_name ( sess, lint_name_only , tool_name , crate_attrs) {
350
350
CheckLintNameResult :: Ok ( _) => None ,
351
351
CheckLintNameResult :: Warning ( ref msg, _) => Some ( sess. struct_warn ( msg) ) ,
352
352
CheckLintNameResult :: NoLint ( suggestion) => {
@@ -408,22 +408,6 @@ impl LintStore {
408
408
}
409
409
}
410
410
411
- pub fn check_lint_and_tool_name (
412
- & self ,
413
- sess : & Session ,
414
- tool_name : Option < Symbol > ,
415
- lint_name : & str ,
416
- crate_attrs : & [ ast:: Attribute ] ,
417
- ) -> CheckLintNameResult < ' _ > {
418
- if let Some ( tool_name) = tool_name {
419
- if !is_known_lint_tool ( tool_name, sess, crate_attrs) {
420
- return CheckLintNameResult :: NoTool ;
421
- }
422
- }
423
-
424
- self . check_lint_name ( lint_name, tool_name)
425
- }
426
-
427
411
/// Checks the name of a lint for its existence, and whether it was
428
412
/// renamed or removed. Generates a DiagnosticBuilder containing a
429
413
/// warning for renamed and removed lints. This is over both lint
@@ -433,9 +417,17 @@ impl LintStore {
433
417
/// printing duplicate warnings.
434
418
pub fn check_lint_name (
435
419
& self ,
420
+ sess : & Session ,
436
421
lint_name : & str ,
437
422
tool_name : Option < Symbol > ,
423
+ crate_attrs : & [ ast:: Attribute ] ,
438
424
) -> CheckLintNameResult < ' _ > {
425
+ if let Some ( tool_name) = tool_name {
426
+ if !is_known_lint_tool ( tool_name, sess, crate_attrs) {
427
+ return CheckLintNameResult :: NoTool ;
428
+ }
429
+ }
430
+
439
431
let complete_name = if let Some ( tool_name) = tool_name {
440
432
format ! ( "{}::{}" , tool_name, lint_name)
441
433
} else {
0 commit comments