2020-04-19 16:40:53 -07:00
|
|
|
// check-pass
|
2019-10-08 10:26:31 +02:00
|
|
|
// compile-flags:--test
|
2023-04-29 04:08:33 -05:00
|
|
|
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
2020-11-26 21:15:15 +01:00
|
|
|
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
2019-10-08 10:26:31 +02:00
|
|
|
|
|
|
|
// Make sure `cfg(doctest)` is set when finding doctests but not inside
|
|
|
|
// the doctests.
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// assert!(!cfg!(doctest));
|
|
|
|
/// ```
|
|
|
|
#[cfg(doctest)]
|
|
|
|
pub struct Foo;
|