-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #98108 - SpriteOvO:doc_auto_cfg-feature-rmv-fix, r=notr…
…iddle,GuillaumeGomez Rustdoc: Fix stab disappearing and exclude cfg "doc" and "doctest" Fixes #98065 Context: #43781 (comment) r? `@GuillaumeGomez`
- Loading branch information
Showing
4 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
#![feature(doc_auto_cfg)] | ||
|
||
#![crate_name = "foo"] | ||
|
||
// @has foo/fn.foo.html | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-doctest' | ||
#[cfg(not(doctest))] | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-meowmeow' | ||
#[cfg(not(meowmeow))] | ||
pub fn foo() {} | ||
|
||
// @has foo/fn.bar.html | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'meowmeow' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test' | ||
#[cfg(any(test, doc))] | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doctest' | ||
#[cfg(any(meowmeow, test, doc, doctest))] | ||
pub fn bar() {} | ||
|
||
// @has foo/fn.appear_1.html | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'meowmeow' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-test' | ||
#[cfg(any(meowmeow, doc, not(test)))] | ||
pub fn appear_1() {} // issue #98065 | ||
|
||
// @has foo/fn.appear_2.html | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'meowmeow' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test' | ||
#[cfg(any(meowmeow, doc, all(test)))] | ||
pub fn appear_2() {} // issue #98065 | ||
|
||
// @has foo/fn.appear_3.html | ||
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'meowmeow' | ||
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' | ||
#[cfg(any(meowmeow, doc, all()))] | ||
pub fn appear_3() {} // issue #98065 |