2024-05-24 11:40:20 -05:00
|
|
|
// Ensure keyword docs are present with --document-private-items
|
|
|
|
|
|
|
|
//@ compile-flags: --document-private-items
|
|
|
|
#![feature(rustdoc_internals)]
|
|
|
|
|
2024-07-19 09:50:47 -05:00
|
|
|
//@ !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!"'
|
2024-05-24 11:40:20 -05:00
|
|
|
#[doc(keyword = "match")]
|
|
|
|
/// this is a test!
|
|
|
|
pub mod foo {}
|
|
|
|
|
2024-07-19 09:50:47 -05:00
|
|
|
//@ !has "$.index[*][?(@.name=='hello')]"
|
|
|
|
//@ has "$.index[*][?(@.name=='bar')]"
|
|
|
|
//@ is "$.index[*][?(@.name=='bar')].attrs" '["#[doc(keyword = \"hello\")]"]'
|
|
|
|
//@ is "$.index[*][?(@.name=='bar')].docs" '"hello"'
|
2024-05-24 11:40:20 -05:00
|
|
|
#[doc(keyword = "hello")]
|
|
|
|
/// hello
|
|
|
|
mod bar {}
|