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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
399 B
Rust
Raw Normal View History

#![feature(doc_auto_cfg)]
#![crate_name = "foo"]
// @has foo/fn.foo.html
2022-01-13 15:50:21 +01:00
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-doctest'
#[cfg(not(doctest))]
pub fn foo() {}
2022-01-13 15:50:21 +01:00
// @has foo/fn.bar.html
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc'
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test'
#[cfg(any(test, doc))]
pub fn bar() {}