mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
367 B
Rust
16 lines
367 B
Rust
// check-pass
|
|
// compile-flags:--test
|
|
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
|
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
|
|
|
#![feature(doc_cfg)]
|
|
|
|
// Make sure `cfg(doc)` is set when finding doctests but not inside the doctests.
|
|
|
|
/// ```
|
|
/// #![feature(doc_cfg)]
|
|
/// assert!(!cfg!(doc));
|
|
/// ```
|
|
#[cfg(doc)]
|
|
pub struct Foo;
|