Skip to content

Commit 3c77b56

Browse files
Update error message for doc(keyword)
1 parent 2ba4838 commit 3c77b56

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
328328
);
329329

330330
if nested_meta.has_name(sym::keyword) {
331-
let msg = concat!("`#[doc(keyword)]` is meant for internal use only");
331+
let msg = "`#[doc(keyword)]` is meant for internal use only";
332332
gate_feature_post!(self, rustdoc_internals, attr.span, msg);
333333
}
334334
}

src/test/ui/feature-gates/feature-gate-rustdoc_internals.rs

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

src/test/ui/feature-gates/feature-gate-rustdoc_internals.stderr

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

0 commit comments

Comments
 (0)