@@ -344,9 +344,9 @@ impl LintStore {
344344 level : Level ,
345345 crate_attrs : & [ ast:: Attribute ] ,
346346 ) {
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) ;
348348
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) {
350350 CheckLintNameResult :: Ok ( _) => None ,
351351 CheckLintNameResult :: Warning ( ref msg, _) => Some ( sess. struct_warn ( msg) ) ,
352352 CheckLintNameResult :: NoLint ( suggestion) => {
@@ -408,22 +408,6 @@ impl LintStore {
408408 }
409409 }
410410
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-
427411 /// Checks the name of a lint for its existence, and whether it was
428412 /// renamed or removed. Generates a DiagnosticBuilder containing a
429413 /// warning for renamed and removed lints. This is over both lint
@@ -433,9 +417,17 @@ impl LintStore {
433417 /// printing duplicate warnings.
434418 pub fn check_lint_name (
435419 & self ,
420+ sess : & Session ,
436421 lint_name : & str ,
437422 tool_name : Option < Symbol > ,
423+ crate_attrs : & [ ast:: Attribute ] ,
438424 ) -> 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+
439431 let complete_name = if let Some ( tool_name) = tool_name {
440432 format ! ( "{}::{}" , tool_name, lint_name)
441433 } else {
0 commit comments