0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-21 22:01:17 +01:00
rust/tests/rustdoc-json/keyword.rs
2024-07-19 16:54:42 +02:00

21 lines
479 B
Rust

// 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 {}