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