Skip to content

Commit 4655783

Browse files
* Add test case for cfg(false) on module level
* Fix typo * Remove usage of `!has`
1 parent ce0c17a commit 4655783

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/rustdoc/cfg-bool.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33

44
// regression test for https://github.com/rust-lang/rust/issues/138112
55

6+
//@ has 'foo/index.html'
7+
//@ has - '//*[@class="stab portability"]/@title' 'Available nowhere'
8+
69
//@ has 'foo/fn.foo.html' '//div[@class="stab portability"]' 'Available nowhere'
710
#[doc(cfg(false))]
811
pub fn foo() {}
912

10-
// a cfg(true) will simply be ommited, as it is the same as no cfg.
13+
// a cfg(true) will simply be omited, as it is the same as no cfg.
1114
//@ !has 'foo/fn.bar.html' '//div[@class="stab portability"]' ''
1215
#[doc(cfg(true))]
1316
pub fn bar() {}

0 commit comments

Comments
 (0)