Skip to content

Commit 44c8825

Browse files
committed
add error message for unused duplicate
1 parent 60792be commit 44c8825

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ attr_parsing_unused_duplicate =
135135
unused attribute
136136
.suggestion = remove this attribute
137137
.note = attribute also specified here
138-
.warn = {-attr_parsing_previously_accepted}
139-
140-
138+
.warn = {-passes_previously_accepted}
141139
attr_parsing_unused_multiple =
142140
multiple `{$name}` attributes
143141
.suggestion = remove this attribute

compiler/rustc_attr_parsing/src/session_diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ pub(crate) struct UnusedMultiple {
452452
}
453453

454454
#[derive(LintDiagnostic)]
455-
#[diag(attr_parsing_unused_multiple)]
455+
#[diag(attr_parsing_unused_duplicate)]
456456
pub(crate) struct UnusedDuplicate {
457457
#[suggestion(code = "", applicability = "machine-applicable")]
458458
pub this: Span,

compiler/rustc_errors/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ pub use rustc_error_messages::{
6262
SubdiagMessage, fallback_fluent_bundle, fluent_bundle,
6363
};
6464
use rustc_hashes::Hash128;
65-
use rustc_lint_defs::LintExpectationId;
65+
use rustc_hir::HirId;
6666
pub use rustc_lint_defs::{Applicability, listify, pluralize};
67+
use rustc_lint_defs::{Lint, LintExpectationId};
6768
use rustc_macros::{Decodable, Encodable};
6869
pub use rustc_span::ErrorGuaranteed;
6970
pub use rustc_span::fatal_error::{FatalError, FatalErrorMarker};

0 commit comments

Comments
 (0)