]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/cfg_doc_reexport.rs
Rollup merge of #107746 - Nathan-Fenner:nathanf/clean-up-adjust_fulfillment_errors...
[rust.git] / tests / rustdoc / cfg_doc_reexport.rs
1 #![feature(doc_cfg)]
2 #![feature(no_core)]
3
4 #![crate_name = "foo"]
5 #![no_core]
6
7 // @has 'foo/index.html'
8 // @has - '//*[@class="item-left"]/*[@class="stab portability"]' 'foobar'
9 // @has - '//*[@class="item-left"]/*[@class="stab portability"]' 'bar'
10
11 #[doc(cfg(feature = "foobar"))]
12 mod imp_priv {
13     // @has 'foo/struct.BarPriv.html'
14     // @has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \
15     //    'Available on crate feature foobar only.'
16     pub struct BarPriv {}
17     impl BarPriv {
18         pub fn test() {}
19     }
20 }
21 #[doc(cfg(feature = "foobar"))]
22 pub use crate::imp_priv::*;
23
24 pub mod bar {
25     // @has 'foo/bar/struct.Bar.html'
26     // @has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \
27     //    'Available on crate feature bar only.'
28     #[doc(cfg(feature = "bar"))]
29     pub struct Bar;
30 }
31
32 #[doc(cfg(feature = "bar"))]
33 pub use bar::Bar;