2019-01-28 12:04:05 -06:00
|
|
|
#![feature(staged_api)]
|
2024-11-01 18:30:36 -05:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![feature(rustdoc_internals)]
|
2019-01-28 12:04:05 -06:00
|
|
|
|
2024-11-01 18:30:36 -05:00
|
|
|
#![stable(feature = "core", since = "1.6.0")]
|
2019-01-28 12:04:05 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has stability/index.html
|
|
|
|
//@ has - '//ul[@class="item-table"]/li[1]//a' AaStable
|
|
|
|
//@ has - '//ul[@class="item-table"]/li[2]//a' ZzStable
|
|
|
|
//@ has - '//ul[@class="item-table"]/li[3]//a' Unstable
|
2023-11-23 19:16:19 -06:00
|
|
|
|
|
|
|
#[stable(feature = "rust2", since = "2.2.2")]
|
|
|
|
pub struct AaStable;
|
|
|
|
|
2024-09-24 13:17:52 -05:00
|
|
|
#[unstable(feature = "test", issue = "none")]
|
2019-01-28 12:04:05 -06:00
|
|
|
pub struct Unstable {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has stability/struct.Unstable.html \
|
2022-04-06 13:41:57 -05:00
|
|
|
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
|
2019-01-28 12:04:05 -06:00
|
|
|
// 'This is a nightly-only experimental API'
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ count stability/struct.Unstable.html '//span[@class="stab unstable"]' 0
|
2019-01-28 12:04:05 -06:00
|
|
|
pub foo: u32,
|
|
|
|
pub bar: u32,
|
|
|
|
}
|
2023-11-23 19:16:19 -06:00
|
|
|
|
|
|
|
#[stable(feature = "rust2", since = "2.2.2")]
|
|
|
|
pub struct ZzStable;
|
2024-09-24 13:17:52 -05:00
|
|
|
|
|
|
|
#[unstable(feature = "unstable", issue = "none")]
|
|
|
|
pub mod unstable {
|
2024-09-29 20:20:17 -05:00
|
|
|
//@ !hasraw stability/unstable/struct.StableInUnstable.html \
|
2024-11-01 18:30:36 -05:00
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]'
|
2024-09-24 13:17:52 -05:00
|
|
|
//@ has - '//div[@class="stab unstable"]' 'experimental'
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
2024-09-29 20:20:17 -05:00
|
|
|
pub struct StableInUnstable;
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub mod stable_in_unstable {
|
|
|
|
//@ !hasraw stability/unstable/stable_in_unstable/struct.Inner.html \
|
2024-11-01 18:30:36 -05:00
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]'
|
2024-09-29 20:20:17 -05:00
|
|
|
//@ has - '//div[@class="stab unstable"]' 'experimental'
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct Inner;
|
|
|
|
}
|
2024-11-01 18:30:36 -05:00
|
|
|
|
|
|
|
//@ has stability/struct.AaStable.html \
|
|
|
|
// '//*[@id="method.foo"]//span[@class="since"]' '2.2.2'
|
|
|
|
impl super::AaStable {
|
|
|
|
#[stable(feature = "rust2", since = "2.2.2")]
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
//@ has stability/unstable/struct.StableInUnstable.html \
|
|
|
|
// '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
|
|
|
|
impl StableInUnstable {
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[unstable(feature = "unstable", issue = "none")]
|
|
|
|
#[doc(hidden)]
|
|
|
|
pub mod unstable_stripped {
|
|
|
|
//@ has stability/struct.AaStable.html \
|
|
|
|
// '//*[@id="method.foo"]//span[@class="since"]' '2.2.2'
|
|
|
|
impl super::AaStable {
|
|
|
|
#[stable(feature = "rust2", since = "2.2.2")]
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2024-09-24 13:17:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[stable(feature = "rust2", since = "2.2.2")]
|
|
|
|
pub mod stable_later {
|
2024-09-29 20:20:17 -05:00
|
|
|
//@ has stability/stable_later/struct.StableInLater.html \
|
2024-11-01 18:30:36 -05:00
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '2.2.2'
|
2024-09-24 13:17:52 -05:00
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
2024-09-29 20:20:17 -05:00
|
|
|
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 \
|
2024-11-01 18:30:36 -05:00
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '2.2.2'
|
2024-09-29 20:20:17 -05:00
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub struct Inner;
|
|
|
|
}
|
2024-09-24 13:17:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
2024-11-01 18:30:36 -05:00
|
|
|
#[rustc_allowed_through_unstable_modules]
|
|
|
|
pub mod stable_earlier1 {
|
|
|
|
//@ has stability/stable_earlier1/struct.StableInUnstable.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
|
|
|
|
//@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub use crate::unstable::StableInUnstable;
|
|
|
|
|
|
|
|
//@ has stability/stable_earlier1/stable_in_unstable/struct.Inner.html \
|
|
|
|
// '//div[@class="main-heading"]//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_earlier1/struct.StableInLater.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub use crate::stable_later::StableInLater;
|
|
|
|
|
|
|
|
//@ has stability/stable_earlier1/stable_in_later/struct.Inner.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub use crate::stable_later::stable_in_later;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// These will inherit the crate stability.
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub mod stable_earlier2 {
|
|
|
|
//@ has stability/stable_earlier2/struct.StableInUnstable.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.6.0'
|
|
|
|
//@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
|
2024-09-29 20:20:17 -05:00
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub use crate::unstable::StableInUnstable;
|
|
|
|
|
2024-11-01 18:30:36 -05:00
|
|
|
//@ has stability/stable_earlier2/stable_in_unstable/struct.Inner.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.6.0'
|
2024-09-29 20:20:17 -05:00
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
pub use crate::unstable::stable_in_unstable;
|
|
|
|
|
2024-11-01 18:30:36 -05:00
|
|
|
//@ has stability/stable_earlier2/struct.StableInLater.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.6.0'
|
2024-09-24 13:17:52 -05:00
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
2024-09-29 20:20:17 -05:00
|
|
|
pub use crate::stable_later::StableInLater;
|
2024-09-24 13:17:52 -05:00
|
|
|
|
2024-11-01 18:30:36 -05:00
|
|
|
//@ has stability/stable_earlier2/stable_in_later/struct.Inner.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.6.0'
|
2024-09-24 13:17:52 -05:00
|
|
|
#[doc(inline)]
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
2024-09-29 20:20:17 -05:00
|
|
|
pub use crate::stable_later::stable_in_later;
|
2024-09-24 13:17:52 -05:00
|
|
|
}
|
2024-11-01 18:30:36 -05:00
|
|
|
|
|
|
|
//@ !hasraw stability/trait.UnstableTraitWithStableMethod.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]'
|
|
|
|
//@ has - '//*[@id="tymethod.foo"]//span[@class="since"]' '1.0.0'
|
|
|
|
//@ has - '//*[@id="method.bar"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[unstable(feature = "unstable", issue = "none")]
|
|
|
|
pub trait UnstableTraitWithStableMethod {
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
fn foo();
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
fn bar() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
//@ has stability/primitive.i32.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[rustc_doc_primitive = "i32"]
|
|
|
|
//
|
|
|
|
/// `i32` is always stable in 1.0, even if you look at it from core.
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
mod prim_i32 {}
|
|
|
|
|
|
|
|
//@ has stability/keyword.if.html \
|
|
|
|
// '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
|
|
|
|
#[doc(keyword = "if")]
|
|
|
|
//
|
|
|
|
/// We currently don't document stability for keywords, but let's test it anyway.
|
|
|
|
#[stable(feature = "rust1", since = "1.0.0")]
|
|
|
|
mod if_keyword {}
|