]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-json/keyword.rs
Rollup merge of #107687 - cjgillot:sroa-2, r=oli-obk
[rust.git] / tests / 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 "$.index[*][?(@.name=='match')]"
10 // @has "$.index[*][?(@.name=='foo')]"
11
12 #[doc(keyword = "match")]
13 /// this is a test!
14 pub mod foo {}
15
16 // @!has "$.index[*][?(@.name=='hello')]"
17 // @!has "$.index[*][?(@.name=='bar')]"
18 #[doc(keyword = "hello")]
19 /// hello
20 mod bar {}