diff options
Diffstat (limited to 'tests/rustdoc-json/keyword.rs')
| -rw-r--r-- | tests/rustdoc-json/keyword.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc-json/keyword.rs b/tests/rustdoc-json/keyword.rs new file mode 100644 index 00000000000..3446b212c56 --- /dev/null +++ b/tests/rustdoc-json/keyword.rs @@ -0,0 +1,20 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/98002>. + +// Keywords should not be generated in rustdoc JSON output and this test +// ensures it. + +#![feature(rustdoc_internals)] +#![no_std] + +// @!has "$.index[*][?(@.name=='match')]" +// @has "$.index[*][?(@.name=='foo')]" + +#[doc(keyword = "match")] +/// this is a test! +pub mod foo {} + +// @!has "$.index[*][?(@.name=='hello')]" +// @!has "$.index[*][?(@.name=='bar')]" +#[doc(keyword = "hello")] +/// hello +mod bar {} |
