rust/tests/rustdoc-json/keyword_private.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
670 B
Rust

// Ensure keyword docs are present with --document-private-items
//@ compile-flags: --document-private-items
#![feature(rustdoc_internals)]
//@ !has "$.index[?(@.name=='match')]"
//@ has "$.index[?(@.name=='foo')]"
//@ is "$.index[?(@.name=='foo')].attrs" '["#[doc(keyword = \"match\")]"]'
//@ is "$.index[?(@.name=='foo')].docs" '"this is a test!"'
#[doc(keyword = "match")]
/// this is a test!
pub mod foo {}
//@ !has "$.index[?(@.name=='break')]"
//@ has "$.index[?(@.name=='bar')]"
//@ is "$.index[?(@.name=='bar')].attrs" '["#[doc(keyword = \"break\")]"]'
//@ is "$.index[?(@.name=='bar')].docs" '"hello"'
#[doc(keyword = "break")]
/// hello
mod bar {}