Skip to content
Permalink
Browse files

Add new rustdoc-ui test to ensuire that rustdoc feature isn't passed …

…down to doctests
  • Loading branch information...
GuillaumeGomez committed Sep 30, 2019
1 parent 445e735 commit 366fdebff8dc6259c67206f78d53f1b1d64854ab
@@ -0,0 +1,14 @@
// 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;
@@ -0,0 +1,6 @@

running 1 test
test $DIR/doc-test-rustdoc-feature.rs - Foo (line 9) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

0 comments on commit 366fdeb

Please sign in to comment.
You can’t perform that action at this time.