mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 08:27:38 +00:00
16 lines
320 B
Rust
16 lines
320 B
Rust
// check-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;
|