about summary refs log tree commit diff
path: root/tests/rustdoc-json/doc_attribute.rs
blob: 9e1a711f0b7b5cd71b925a9ba3ef6fe9c1c55936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Doc attributes (`#[doc(attribute = "...")]` should not be generated in rustdoc JSON output
// and this test ensures it.

#![feature(rustdoc_internals)]
#![no_std]

//@ !has "$.index[?(@.name=='repr')]"
//@ has "$.index[?(@.name=='foo')]"

#[doc(attribute = "repr")]
/// this is a test!
pub mod foo {}

//@ !has "$.index[?(@.name=='forbid')]"
//@ !has "$.index[?(@.name=='bar')]"
#[doc(attribute = "forbid")]
/// hello
mod bar {}