diff options
Diffstat (limited to 'tests/rustdoc/stability.rs')
-rw-r--r-- | tests/rustdoc/stability.rs | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/tests/rustdoc/stability.rs b/tests/rustdoc/stability.rs index de855b43ba5..fc72154cad8 100644 --- a/tests/rustdoc/stability.rs +++ b/tests/rustdoc/stability.rs @@ -25,28 +25,61 @@ pub struct ZzStable; #[unstable(feature = "unstable", issue = "none")] pub mod unstable { - //@ !hasraw stability/unstable/struct.Foo.html '//span[@class="since"]' + //@ !hasraw stability/unstable/struct.StableInUnstable.html \ + // '//span[@class="since"]' //@ has - '//div[@class="stab unstable"]' 'experimental' #[stable(feature = "rust1", since = "1.0.0")] - pub struct Foo; + pub struct StableInUnstable; + + #[stable(feature = "rust1", since = "1.0.0")] + pub mod stable_in_unstable { + //@ !hasraw stability/unstable/stable_in_unstable/struct.Inner.html \ + // '//span[@class="since"]' + //@ has - '//div[@class="stab unstable"]' 'experimental' + #[stable(feature = "rust1", since = "1.0.0")] + pub struct Inner; + } } #[stable(feature = "rust2", since = "2.2.2")] pub mod stable_later { - //@ has stability/stable_later/struct.Bar.html '//span[@class="since"]' '2.2.2' + //@ has stability/stable_later/struct.StableInLater.html \ + // '//span[@class="since"]' '2.2.2' #[stable(feature = "rust1", since = "1.0.0")] - pub struct Bar; + pub struct StableInLater; + + #[stable(feature = "rust1", since = "1.0.0")] + pub mod stable_in_later { + //@ has stability/stable_later/stable_in_later/struct.Inner.html \ + // '//span[@class="since"]' '2.2.2' + #[stable(feature = "rust1", since = "1.0.0")] + pub struct Inner; + } } #[stable(feature = "rust1", since = "1.0.0")] pub mod stable_earlier { - //@ has stability/stable_earlier/struct.Foo.html '//span[@class="since"]' '1.0.0' + //@ has stability/stable_earlier/struct.StableInUnstable.html \ + // '//span[@class="since"]' '1.0.0' + #[doc(inline)] + #[stable(feature = "rust1", since = "1.0.0")] + pub use crate::unstable::StableInUnstable; + + //@ has stability/stable_earlier/stable_in_unstable/struct.Inner.html \ + // '//span[@class="since"]' '1.0.0' + #[doc(inline)] + #[stable(feature = "rust1", since = "1.0.0")] + pub use crate::unstable::stable_in_unstable; + + //@ has stability/stable_earlier/struct.StableInLater.html \ + // '//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] - pub use crate::unstable::Foo; + pub use crate::stable_later::StableInLater; - //@ has stability/stable_earlier/struct.Bar.html '//span[@class="since"]' '1.0.0' + //@ has stability/stable_earlier/stable_in_later/struct.Inner.html \ + // '//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] - pub use crate::stable_later::Bar; + pub use crate::stable_later::stable_in_later; } |