summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-ui/doc-test-doctest-feature.rs
blob: 0b79aaece8a03e1653a2a9c40e7febe7b20a7649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-pass
// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

// Make sure `cfg(doctest)` is set when finding doctests but not inside
// the doctests.

/// ```
/// assert!(!cfg!(doctest));
/// ```
#[cfg(doctest)]
pub struct Foo;