Make invalid_doc_attribute lint plural

This commit is contained in:
Guillaume Gomez 2021-03-05 14:44:31 +01:00
parent 55cec9079d
commit a11e87e74d
6 changed files with 9 additions and 9 deletions

View file

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

View file

@ -18,7 +18,7 @@ use rustc_hir::{
}; };
use rustc_hir::{MethodKind, Target}; use rustc_hir::{MethodKind, Target};
use rustc_session::lint::builtin::{ use rustc_session::lint::builtin::{
CONFLICTING_REPR_HINTS, INVALID_DOC_ATTRIBUTE, UNUSED_ATTRIBUTES, CONFLICTING_REPR_HINTS, INVALID_DOC_ATTRIBUTES, UNUSED_ATTRIBUTES,
}; };
use rustc_session::parse::feature_err; use rustc_session::parse::feature_err;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
@ -549,7 +549,7 @@ impl CheckAttrVisitor<'tcx> {
} else if meta.has_name(sym::test) { } else if meta.has_name(sym::test) {
if CRATE_HIR_ID != hir_id { if CRATE_HIR_ID != hir_id {
self.tcx.struct_span_lint_hir( self.tcx.struct_span_lint_hir(
INVALID_DOC_ATTRIBUTE, INVALID_DOC_ATTRIBUTES,
hir_id, hir_id,
meta.span(), meta.span(),
|lint| { |lint| {
@ -585,7 +585,7 @@ impl CheckAttrVisitor<'tcx> {
.any(|m| i_meta.has_name(*m)) .any(|m| i_meta.has_name(*m))
{ {
self.tcx.struct_span_lint_hir( self.tcx.struct_span_lint_hir(
INVALID_DOC_ATTRIBUTE, INVALID_DOC_ATTRIBUTES,
hir_id, hir_id,
i_meta.span, i_meta.span,
|lint| { |lint| {

View file

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

View file

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

View file

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

View file

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