Skip to content

Commit a11e87e

Browse files
Make invalid_doc_attribute lint plural
1 parent 55cec90 commit a11e87e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3061,7 +3061,7 @@ declare_lint! {
30613061
}
30623062

30633063
declare_lint! {
3064-
/// The `invalid_doc_attribute` lint detects when the `#[doc(...)]` is
3064+
/// The `invalid_doc_attributes` lint detects when the `#[doc(...)]` is
30653065
/// misused.
30663066
///
30673067
/// ### Example
@@ -3081,7 +3081,7 @@ declare_lint! {
30813081
/// Previously, there were very like checks being performed on `#[doc(..)]`
30823082
/// unlike the other attributes. It'll now catch all the issues that it
30833083
/// silently ignored previously.
3084-
pub INVALID_DOC_ATTRIBUTE,
3084+
pub INVALID_DOC_ATTRIBUTES,
30853085
Warn,
30863086
"detects invalid `#[doc(...)]` attributes",
30873087
@future_incompatible = FutureIncompatibleInfo {

compiler/rustc_passes/src/check_attr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_hir::{
1818
};
1919
use rustc_hir::{MethodKind, Target};
2020
use rustc_session::lint::builtin::{
21-
CONFLICTING_REPR_HINTS, INVALID_DOC_ATTRIBUTE, UNUSED_ATTRIBUTES,
21+
CONFLICTING_REPR_HINTS, INVALID_DOC_ATTRIBUTES, UNUSED_ATTRIBUTES,
2222
};
2323
use rustc_session::parse::feature_err;
2424
use rustc_span::symbol::{sym, Symbol};
@@ -549,7 +549,7 @@ impl CheckAttrVisitor<'tcx> {
549549
} else if meta.has_name(sym::test) {
550550
if CRATE_HIR_ID != hir_id {
551551
self.tcx.struct_span_lint_hir(
552-
INVALID_DOC_ATTRIBUTE,
552+
INVALID_DOC_ATTRIBUTES,
553553
hir_id,
554554
meta.span(),
555555
|lint| {
@@ -585,7 +585,7 @@ impl CheckAttrVisitor<'tcx> {
585585
.any(|m| i_meta.has_name(*m))
586586
{
587587
self.tcx.struct_span_lint_hir(
588-
INVALID_DOC_ATTRIBUTE,
588+
INVALID_DOC_ATTRIBUTES,
589589
hir_id,
590590
i_meta.span,
591591
|lint| {

src/test/rustdoc-ui/doc-attr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the lint level is defined here
99
|
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
12-
= note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12+
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

src/test/rustdoc-ui/doc-attr2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the lint level is defined here
99
|
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
12-
= note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12+
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

src/test/ui/attributes/doc-attr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the lint level is defined here
99
|
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
12-
= note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12+
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

src/test/ui/attributes/doc-attr2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: the lint level is defined here
99
|
1010
LL | #![deny(warnings)]
1111
| ^^^^^^^^
12-
= note: `#[deny(invalid_doc_attribute)]` implied by `#[deny(warnings)]`
12+
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

0 commit comments

Comments
 (0)