-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02a845a
commit 1ec1d94
Showing
1 changed file
with
26 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/59368>. | ||
// The goal is to ensure that `doc(hidden)`, `doc(inline)` and `doc(no_inline`) | ||
|
||
#![crate_name = "foo"] | ||
#![feature(doc_cfg)] | ||
|
||
// @has 'foo/index.html' | ||
|
||
#[doc(hidden, cfg(feature = "foo"))] | ||
pub struct Foo; | ||
|
||
#[doc(hidden, no_inline, cfg(feature = "bar"))] | ||
pub use Foo as Foo1; | ||
|
||
#[doc(hidden, inline)] | ||
pub use Foo1 as Foo2; | ||
|
||
// First we ensure that none of the other items are generated. | ||
// @count - '//a[@class="struct"]' 1 | ||
// Then we check that both `cfg` are displayed. | ||
// @has - '//*[@class="stab portability"]' 'foo' | ||
// @has - '//*[@class="stab portability"]' 'bar' | ||
// And finally we check that the only element displayed is `Bar`. | ||
// @has - '//a[@class="struct"]' 'Bar' | ||
#[doc(inline)] | ||
pub use Foo2 as Bar; |