about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
blob: dd04adfe6179c9b419fdbe072363f79e297bc847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"

#![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;