Skip to content

Commit 284c3a3

Browse files
committed
The lint name must be plural according to RFC-344
1 parent fd8a79f commit 284c3a3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,7 @@ declare_lint_pass! {
33983398
UNFULFILLED_LINT_EXPECTATIONS,
33993399
UNINHABITED_STATIC,
34003400
UNKNOWN_CRATE_TYPES,
3401-
UNKNOWN_DIAGNOSTIC_ATTRIBUTE,
3401+
UNKNOWN_DIAGNOSTIC_ATTRIBUTES,
34023402
UNKNOWN_LINTS,
34033403
UNREACHABLE_CODE,
34043404
UNREACHABLE_PATTERNS,
@@ -4272,7 +4272,7 @@ declare_lint! {
42724272
/// the spelling, and check the diagnostic attribute listing for the correct name. Also
42734273
/// consider if you are using an old version of the compiler, and the attribute
42744274
/// is only available in a newer version.
4275-
pub UNKNOWN_DIAGNOSTIC_ATTRIBUTE,
4275+
pub UNKNOWN_DIAGNOSTIC_ATTRIBUTES,
42764276
Warn,
42774277
"unrecognized diagnostic attribute"
42784278
}

compiler/rustc_resolve/src/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use rustc_middle::middle::stability;
2222
use rustc_middle::ty::RegisteredTools;
2323
use rustc_middle::ty::TyCtxt;
2424
use rustc_session::lint::builtin::{
25-
LEGACY_DERIVE_HELPERS, SOFT_UNSTABLE, UNKNOWN_DIAGNOSTIC_ATTRIBUTE,
25+
LEGACY_DERIVE_HELPERS, SOFT_UNSTABLE, UNKNOWN_DIAGNOSTIC_ATTRIBUTES,
2626
};
2727
use rustc_session::lint::builtin::{UNUSED_MACROS, UNUSED_MACRO_RULES};
2828
use rustc_session::lint::BuiltinLintDiagnostics;
@@ -512,7 +512,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
512512
.span_err(path.span, "Diagnostic attributes requires a path with 2 segments");
513513
} else {
514514
self.tcx.sess.parse_sess.buffer_lint(
515-
UNKNOWN_DIAGNOSTIC_ATTRIBUTE,
515+
UNKNOWN_DIAGNOSTIC_ATTRIBUTES,
516516
path.segments[1].span(),
517517
node_id,
518518
"Unknown diagnostic attribute",

tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: Unknown diagnostic attribute
44
LL | #[diagnostic::non_existing_attribute]
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `#[warn(unknown_diagnostic_attribute)]` on by default
7+
= note: `#[warn(unknown_diagnostic_attributes)]` on by default
88

99
warning: Unknown diagnostic attribute
1010
--> $DIR/non_existing_attributes_accepted.rs:8:15

0 commit comments

Comments
 (0)