From fca088ae23cd2f3ea261e1d0c04e799a2918bb6f Mon Sep 17 00:00:00 2001 From: Tor Hovland Date: Wed, 14 Apr 2021 20:49:08 +0200 Subject: Now also displays portability tags. --- src/test/rustdoc/issue-83832.rs | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'src/test/rustdoc') 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; } -- cgit 1.4.1-3-g733a5