Files
rust/tests/rustdoc-json/doc_attribute.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
432 B
Rust
Raw Permalink Normal View History

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