forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#101006 - GuillaumeGomez:doc-cfg-reexport, r…
…=notriddle Fix doc cfg on reexports Fixes rust-lang#83428. The problem was that the newly inlined item cfg propagation was not working since its real parent is different than its current one. For the implementation, I decided to put it directly into `CfgPropagation` instead of inside `inline.rs` because I thought it would be simpler to maintain and to not forget if new kind of items are added if it's all done in one place. r? `@notriddle`
- Loading branch information
Showing
6 changed files
with
104 additions
and
8 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
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 |
---|---|---|
@@ -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; |