blob: 2af5782453e6d62dc22bcf5262d21d12c3f4c2e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// check-pass
// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
#![feature(doc_cfg)]
// Make sure `cfg(doc)` is set when finding doctests but not inside the doctests.
/// ```
/// #![feature(doc_cfg)]
/// assert!(!cfg!(doc));
/// ```
#[cfg(doc)]
pub struct Foo;
|