-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for missing cfg propagation for reexport
- Loading branch information
1 parent
01d64f5
commit 2ed9454
Showing
1 changed file
with
33 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,33 @@ | ||
#![feature(doc_cfg)] | ||
#![feature(no_core)] | ||
|
||
#![crate_name = "foo"] | ||
#![no_core] | ||
|
||
// @has 'foo/index.html' | ||
// @has - '//*[@class="item-left module-item"]/*[@class="stab portability"]' 'foobar' | ||
// @has - '//*[@class="item-left module-item"]/*[@class="stab portability"]' 'bar' | ||
|
||
#[doc(cfg(feature = "foobar"))] | ||
mod imp_priv { | ||
// @has 'foo/struct.BarPriv.html' | ||
// @has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ | ||
// 'Available on crate feature foobar only.' | ||
pub struct BarPriv {} | ||
impl BarPriv { | ||
pub fn test() {} | ||
} | ||
} | ||
#[doc(cfg(feature = "foobar"))] | ||
pub use crate::imp_priv::*; | ||
|
||
pub mod bar { | ||
// @has 'foo/bar/struct.Bar.html' | ||
// @has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ | ||
// 'Available on crate feature bar only.' | ||
#[doc(cfg(feature = "bar"))] | ||
pub struct Bar; | ||
} | ||
|
||
#[doc(cfg(feature = "bar"))] | ||
pub use bar::Bar; |