2021-11-02 14:36:54 +01:00
|
|
|
#![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))]
|
2021-11-02 14:36:54 +01:00
|
|
|
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() {}
|