diff options
Diffstat (limited to 'tests/rustdoc/doctest/doctest-cfg-feature-30252.rs')
-rw-r--r-- | tests/rustdoc/doctest/doctest-cfg-feature-30252.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs new file mode 100644 index 000000000..ceb8076fe --- /dev/null +++ b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs @@ -0,0 +1,9 @@ +// compile-flags:--test --cfg feature="bar" + +// https://github.com/rust-lang/rust/issues/30252 +#![crate_name="issue_30252"] + +/// ```rust +/// assert_eq!(cfg!(feature = "bar"), true); +/// ``` +pub fn foo() {} |