]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-json/keyword.rs
Rollup merge of #100528 - tux3:riscv-bitmanip-features, r=davidtwco
[rust.git] / src / test / rustdoc-json / keyword.rs
1 // Regression test for <https://github.com/rust-lang/rust/issues/98002>.
2
3 // Keywords should not be generated in rustdoc JSON output and this test
4 // ensures it.
5
6 #![feature(rustdoc_internals)]
7 #![no_std]
8
9 // @has keyword.json
10 // @!has - "$.index[*][?(@.name=='match')]"
11 // @has - "$.index[*][?(@.name=='foo')]"
12
13 #[doc(keyword = "match")]
14 /// this is a test!
15 pub mod foo {}
16
17 // @!has - "$.index[*][?(@.name=='hello')]"
18 // @!has - "$.index[*][?(@.name=='bar')]"
19 #[doc(keyword = "hello")]
20 /// hello
21 mod bar {}