diff options
| author | Tor Hovland <tor.hovland@bekk.no> | 2021-04-14 20:49:08 +0200 |
|---|---|---|
| committer | Tor Hovland <tor.hovland@bekk.no> | 2021-04-18 10:46:06 +0200 |
| commit | fca088ae23cd2f3ea261e1d0c04e799a2918bb6f (patch) | |
| tree | 426d2e5666b5b53be372ec71bb79d34dc4b11edd /src/test/rustdoc | |
| parent | 1e2ab998c378e3c9b532e811a8f93b6a65711f92 (diff) | |
| download | rust-fca088ae23cd2f3ea261e1d0c04e799a2918bb6f.tar.gz rust-fca088ae23cd2f3ea261e1d0c04e799a2918bb6f.zip | |
Now also displays portability tags.
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/issue-83832.rs | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/test/rustdoc/issue-83832.rs b/src/test/rustdoc/issue-83832.rs index 93dff7c6ce6..a00401fbe09 100644 --- a/src/test/rustdoc/issue-83832.rs +++ b/src/test/rustdoc/issue-83832.rs @@ -1,21 +1,36 @@ #![crate_name = "foo"] +#![feature(doc_cfg)] -pub mod io { +pub mod tag { #[deprecated(since = "0.1.8", note = "Use bar() instead")] - pub trait Reader {} - pub trait Writer {} + pub trait Deprecated {} + + #[doc(cfg(feature = "sync"))] + pub trait Portability {} + + pub trait Unstable {} } // @has foo/mod1/index.html pub mod mod1 { - // @has - '//code' 'pub use io::Reader;' + // @has - '//code' 'pub use tag::Deprecated;' // @has - '//span' 'Deprecated' - pub use io::Reader; + // @!has - '//span' 'sync' + pub use tag::Deprecated; } // @has foo/mod2/index.html pub mod mod2 { - // @has - '//code' 'pub use io::Writer;' + // @has - '//code' 'pub use tag::Portability;' + // @!has - '//span' 'Deprecated' + // @has - '//span' 'sync' + pub use tag::Portability; +} + +// @has foo/mod3/index.html +pub mod mod3 { + // @has - '//code' 'pub use tag::Unstable;' // @!has - '//span' 'Deprecated' - pub use io::Writer; + // @!has - '//span' 'sync' + pub use tag::Unstable; } |
