]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/duplicate-cfg.rs
Rollup merge of #67784 - Mark-Simulacrum:residual-pad-integral, r=dtolnay
[rust.git] / src / test / rustdoc / duplicate-cfg.rs
1 // ignore-tidy-linelength
2
3 #![crate_name = "foo"]
4 #![feature(doc_cfg)]
5
6 // @has 'foo/struct.Foo.html'
7 // @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" only.'
8 #[doc(cfg(feature = "sync"))]
9 #[doc(cfg(feature = "sync"))]
10 pub struct Foo;
11
12 // @has 'foo/bar/struct.Bar.html'
13 // @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" only.'
14 #[doc(cfg(feature = "sync"))]
15 pub mod bar {
16     #[doc(cfg(feature = "sync"))]
17     pub struct Bar;
18 }
19
20 // @has 'foo/baz/struct.Baz.html'
21 // @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" only.'
22 #[doc(cfg(all(feature = "sync", feature = "send")))]
23 pub mod baz {
24     #[doc(cfg(feature = "sync"))]
25     pub struct Baz;
26 }
27
28 // @has 'foo/qux/struct.Qux.html'
29 // @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" only.'
30 #[doc(cfg(feature = "sync"))]
31 pub mod qux {
32     #[doc(cfg(all(feature = "sync", feature = "send")))]
33     pub struct Qux;
34 }
35
36 // @has 'foo/quux/struct.Quux.html'
37 // @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" and foo and bar only.'
38 #[doc(cfg(all(feature = "sync", feature = "send", foo)))]
39 pub mod quux {
40     #[doc(cfg(all(feature = "send", feature = "sync", bar)))]
41     pub struct Quux;
42 }