Skip to content

Commit fd005f5

Browse files
Update doc_auto_cfg test
1 parent 682ef4d commit fd005f5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/rustdoc/doc-auto-cfg.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
#![crate_name = "foo"]
44

55
// @has foo/fn.foo.html
6-
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-test'
7-
#[cfg(not(test))]
6+
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-doctest'
7+
#[cfg(not(doctest))]
88
pub fn foo() {}
9+
10+
// @has foo/fn.bar.html
11+
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc'
12+
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test'
13+
#[cfg(any(test, doc))]
14+
pub fn bar() {}

0 commit comments

Comments
 (0)