mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 20:28:33 +00:00
15 lines
309 B
Rust
15 lines
309 B
Rust
![]() |
// build-pass
|
||
|
// compile-flags:--test
|
||
|
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
||
|
|
||
|
#![feature(doc_cfg)]
|
||
|
|
||
|
// Make sure `cfg(rustdoc)` is set when finding doctests but not inside the doctests.
|
||
|
|
||
|
/// ```
|
||
|
/// #![feature(doc_cfg)]
|
||
|
/// assert!(!cfg!(rustdoc));
|
||
|
/// ```
|
||
|
#[cfg(rustdoc)]
|
||
|
pub struct Foo;
|