rust/tests/rustdoc-json/keyword.rs
Alona Enraght-Moony 7ab71c417b tests/rustdoc-json: replace $.index[*][? with $.index[?
Done automatically with VSCode.
2025-03-21 00:48:09 +00:00

21 lines
467 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=='break')]"
//@ !has "$.index[?(@.name=='bar')]"
#[doc(keyword = "break")]
/// hello
mod bar {}