Skip to content

Commit

Permalink
Update error message for doc(keyword)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 24, 2021
1 parent 2ba4838 commit 3c77b56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {}

Expand Down
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down

0 comments on commit 3c77b56

Please sign in to comment.