Update error message for doc(keyword)

This commit is contained in:
Guillaume Gomez 2021-11-08 20:00:22 +01:00
parent 2ba483883e
commit 3c77b56d94
3 changed files with 3 additions and 3 deletions

View file

@ -328,7 +328,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
);
if nested_meta.has_name(sym::keyword) {
let msg = concat!("`#[doc(keyword)]` is meant for internal use only");
let msg = "`#[doc(keyword)]` is meant for internal use only";
gate_feature_post!(self, rustdoc_internals, attr.span, msg);
}
}

View file

@ -1,4 +1,4 @@
#[doc(keyword = "match")] //~ ERROR: `#[doc(keyword)]` is experimental
#[doc(keyword = "match")] //~ ERROR: `#[doc(keyword)]` is meant for internal use only
/// wonderful
mod foo {}

View file

@ -1,4 +1,4 @@
error[E0658]: `#[doc(keyword)]` is experimental
error[E0658]: `#[doc(keyword)]` is meant for internal use only
--> $DIR/feature-gate-rustdoc_internals.rs:1:1
|
LL | #[doc(keyword = "match")]