summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-json/keyword.rs
blob: 78a843aca7b9513e663d37c16477f6e026bf780a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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 keyword.json
// @!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 {}