]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-ui/doc-test-rustdoc-feature.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / rustdoc-ui / doc-test-rustdoc-feature.rs
1 // check-pass
2 // compile-flags:--test
3 // normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
4 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
5
6 #![feature(doc_cfg)]
7
8 // Make sure `cfg(doc)` is set when finding doctests but not inside the doctests.
9
10 /// ```
11 /// #![feature(doc_cfg)]
12 /// assert!(!cfg!(doc));
13 /// ```
14 #[cfg(doc)]
15 pub struct Foo;