diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2020-01-06 23:57:02 +0000 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2020-01-06 23:57:02 +0000 |
| commit | 86b9d49cbe9fe4b97bbe120d3902f82af9f7993a (patch) | |
| tree | 5359e7e0e1ee3e23d6143ac494e5d3eac4f08afe /src/test | |
| parent | cd8377d37e9bc47f9a5a982c41705a7800cbb51d (diff) | |
| download | rust-86b9d49cbe9fe4b97bbe120d3902f82af9f7993a.tar.gz rust-86b9d49cbe9fe4b97bbe120d3902f82af9f7993a.zip | |
rustdoc: Remove more `#[doc(cfg(..))]` duplicates
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/duplicate-cfg.rs | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/test/rustdoc/duplicate-cfg.rs b/src/test/rustdoc/duplicate-cfg.rs index 505d6ee769a..9ccc5d7882e 100644 --- a/src/test/rustdoc/duplicate-cfg.rs +++ b/src/test/rustdoc/duplicate-cfg.rs @@ -1,15 +1,42 @@ +// ignore-tidy-linelength + #![crate_name = "foo"] #![feature(doc_cfg)] -// @has 'foo/index.html' -// @!has '-' '//*[@class="stab portability"]' 'feature="sync" and' -// @has '-' '//*[@class="stab portability"]' 'feature="sync"' +// @has 'foo/struct.Foo.html' +// @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" only.' #[doc(cfg(feature = "sync"))] #[doc(cfg(feature = "sync"))] pub struct Foo; +// @has 'foo/bar/struct.Bar.html' +// @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" only.' #[doc(cfg(feature = "sync"))] pub mod bar { #[doc(cfg(feature = "sync"))] pub struct Bar; } + +// @has 'foo/baz/struct.Baz.html' +// @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" only.' +#[doc(cfg(all(feature = "sync", feature = "send")))] +pub mod baz { + #[doc(cfg(feature = "sync"))] + pub struct Baz; +} + +// @has 'foo/qux/struct.Qux.html' +// @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" only.' +#[doc(cfg(feature = "sync"))] +pub mod qux { + #[doc(cfg(all(feature = "sync", feature = "send")))] + pub struct Qux; +} + +// @has 'foo/quux/struct.Quux.html' +// @has '-' '//*[@class="stab portability"]' 'This is supported on feature="sync" and feature="send" and foo and bar only.' +#[doc(cfg(all(feature = "sync", feature = "send", foo)))] +pub mod quux { + #[doc(cfg(all(feature = "send", feature = "sync", bar)))] + pub struct Quux; +} |
