From dbe838079ca9ec3ea76e196cccd68754fe1bbd70 Mon Sep 17 00:00:00 2001 From: Rejyr Date: Sat, 20 Aug 2022 12:30:49 -0400 Subject: [PATCH] rename: `UnknownTool` to `UnknownToolInScopedLint` --- compiler/rustc_error_messages/locales/en-US/lint.ftl | 2 +- compiler/rustc_lint/src/errors.rs | 4 ++-- compiler/rustc_lint/src/levels.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_error_messages/locales/en-US/lint.ftl b/compiler/rustc_error_messages/locales/en-US/lint.ftl index cb393d67193b..9ae226857d3e 100644 --- a/compiler/rustc_error_messages/locales/en-US/lint.ftl +++ b/compiler/rustc_error_messages/locales/en-US/lint.ftl @@ -412,5 +412,5 @@ lint_reason_must_be_string_literal = reason must be a string literal lint_reason_must_come_last = reason in lint attribute must come last -lint_unknown_tool = unknown tool name `{$tool_name}` found in scoped lint: `{$tool_name}::{$lint_name}` +lint_unknown_tool_in_scoped_lint = unknown tool name `{$tool_name}` found in scoped lint: `{$tool_name}::{$lint_name}` .help = add `#![register_tool({$tool_name})]` to the crate root diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index 569f68bd5e53..0f8b8e174d83 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -61,8 +61,8 @@ pub enum MalformedAttributeSub { } #[derive(SessionDiagnostic)] -#[error(lint::unknown_tool, code = "E0710")] -pub struct UnknownTool { +#[error(lint::unknown_tool_in_scoped_lint, code = "E0710")] +pub struct UnknownToolInScopedLint { #[primary_span] pub span: Option, pub tool_name: Symbol, diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 2bafe64c1394..41d89229009b 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -28,7 +28,7 @@ use tracing::debug; use crate::errors::{ MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub, - UnknownTool, + UnknownToolInScopedLint, }; fn lint_levels(tcx: TyCtxt<'_>, (): ()) -> LintLevelMap { @@ -510,7 +510,7 @@ impl<'s> LintLevelsBuilder<'s> { } &CheckLintNameResult::NoTool => { - sess.emit_err(UnknownTool { + sess.emit_err(UnknownToolInScopedLint { span: tool_ident.map(|ident| ident.span), tool_name: tool_name.unwrap(), lint_name: pprust::path_to_string(&meta_item.path),