11#![ feature( staged_api) ]
2+ #![ feature( rustc_attrs) ]
3+ #![ feature( rustdoc_internals) ]
24
3- #![ stable( feature = "rust1 " , since = "1.0 .0" ) ]
5+ #![ stable( feature = "core " , since = "1.6 .0" ) ]
46
57//@ has stability/index.html
68//@ has - '//ul[@class="item-table"]/li[1]//a' AaStable
@@ -26,60 +28,144 @@ pub struct ZzStable;
2628#[ unstable( feature = "unstable" , issue = "none" ) ]
2729pub mod unstable {
2830 //@ !hasraw stability/unstable/struct.StableInUnstable.html \
29- // '//span[@class="since"]'
31+ // '//div[@class="main-heading"]// span[@class="since"]'
3032 //@ has - '//div[@class="stab unstable"]' 'experimental'
3133 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
3234 pub struct StableInUnstable ;
3335
3436 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
3537 pub mod stable_in_unstable {
3638 //@ !hasraw stability/unstable/stable_in_unstable/struct.Inner.html \
37- // '//span[@class="since"]'
39+ // '//div[@class="main-heading"]// span[@class="since"]'
3840 //@ has - '//div[@class="stab unstable"]' 'experimental'
3941 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
4042 pub struct Inner ;
4143 }
44+
45+ //@ has stability/struct.AaStable.html \
46+ // '//*[@id="method.foo"]//span[@class="since"]' '2.2.2'
47+ impl super :: AaStable {
48+ #[ stable( feature = "rust2" , since = "2.2.2" ) ]
49+ pub fn foo ( ) { }
50+ }
51+
52+ //@ has stability/unstable/struct.StableInUnstable.html \
53+ // '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
54+ impl StableInUnstable {
55+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
56+ pub fn foo ( ) { }
57+ }
58+ }
59+
60+ #[ unstable( feature = "unstable" , issue = "none" ) ]
61+ #[ doc( hidden) ]
62+ pub mod unstable_stripped {
63+ //@ has stability/struct.AaStable.html \
64+ // '//*[@id="method.foo"]//span[@class="since"]' '2.2.2'
65+ impl super :: AaStable {
66+ #[ stable( feature = "rust2" , since = "2.2.2" ) ]
67+ pub fn foo ( ) { }
68+ }
4269}
4370
4471#[ stable( feature = "rust2" , since = "2.2.2" ) ]
4572pub mod stable_later {
4673 //@ has stability/stable_later/struct.StableInLater.html \
47- // '//span[@class="since"]' '2.2.2'
74+ // '//div[@class="main-heading"]// span[@class="since"]' '2.2.2'
4875 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
4976 pub struct StableInLater ;
5077
5178 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
5279 pub mod stable_in_later {
5380 //@ has stability/stable_later/stable_in_later/struct.Inner.html \
54- // '//span[@class="since"]' '2.2.2'
81+ // '//div[@class="main-heading"]// span[@class="since"]' '2.2.2'
5582 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
5683 pub struct Inner ;
5784 }
5885}
5986
6087#[ stable( feature = "rust1" , since = "1.0.0" ) ]
61- pub mod stable_earlier {
62- //@ has stability/stable_earlier/struct.StableInUnstable.html \
63- // '//span[@class="since"]' '1.0.0'
88+ #[ rustc_allowed_through_unstable_modules]
89+ pub mod stable_earlier1 {
90+ //@ has stability/stable_earlier1/struct.StableInUnstable.html \
91+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
92+ //@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
93+ #[ doc( inline) ]
94+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
95+ pub use crate :: unstable:: StableInUnstable ;
96+
97+ //@ has stability/stable_earlier1/stable_in_unstable/struct.Inner.html \
98+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
99+ #[ doc( inline) ]
100+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
101+ pub use crate :: unstable:: stable_in_unstable;
102+
103+ //@ has stability/stable_earlier1/struct.StableInLater.html \
104+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
105+ #[ doc( inline) ]
106+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
107+ pub use crate :: stable_later:: StableInLater ;
108+
109+ //@ has stability/stable_earlier1/stable_in_later/struct.Inner.html \
110+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
111+ #[ doc( inline) ]
112+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
113+ pub use crate :: stable_later:: stable_in_later;
114+ }
115+
116+ /// These will inherit the crate stability.
117+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
118+ pub mod stable_earlier2 {
119+ //@ has stability/stable_earlier2/struct.StableInUnstable.html \
120+ // '//div[@class="main-heading"]//span[@class="since"]' '1.6.0'
121+ //@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0'
64122 #[ doc( inline) ]
65123 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
66124 pub use crate :: unstable:: StableInUnstable ;
67125
68- //@ has stability/stable_earlier /stable_in_unstable/struct.Inner.html \
69- // '//span[@class="since"]' '1.0 .0'
126+ //@ has stability/stable_earlier2 /stable_in_unstable/struct.Inner.html \
127+ // '//div[@class="main-heading"]// span[@class="since"]' '1.6 .0'
70128 #[ doc( inline) ]
71129 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
72130 pub use crate :: unstable:: stable_in_unstable;
73131
74- //@ has stability/stable_earlier /struct.StableInLater.html \
75- // '//span[@class="since"]' '1.0 .0'
132+ //@ has stability/stable_earlier2 /struct.StableInLater.html \
133+ // '//div[@class="main-heading"]// span[@class="since"]' '1.6 .0'
76134 #[ doc( inline) ]
77135 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
78136 pub use crate :: stable_later:: StableInLater ;
79137
80- //@ has stability/stable_earlier /stable_in_later/struct.Inner.html \
81- // '//span[@class="since"]' '1.0 .0'
138+ //@ has stability/stable_earlier2 /stable_in_later/struct.Inner.html \
139+ // '//div[@class="main-heading"]// span[@class="since"]' '1.6 .0'
82140 #[ doc( inline) ]
83141 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
84142 pub use crate :: stable_later:: stable_in_later;
85143}
144+
145+ //@ !hasraw stability/trait.UnstableTraitWithStableMethod.html \
146+ // '//div[@class="main-heading"]//span[@class="since"]'
147+ //@ has - '//*[@id="tymethod.foo"]//span[@class="since"]' '1.0.0'
148+ //@ has - '//*[@id="method.bar"]//span[@class="since"]' '1.0.0'
149+ #[ unstable( feature = "unstable" , issue = "none" ) ]
150+ pub trait UnstableTraitWithStableMethod {
151+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
152+ fn foo ( ) ;
153+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
154+ fn bar ( ) { }
155+ }
156+
157+ //@ has stability/primitive.i32.html \
158+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
159+ #[ rustc_doc_primitive = "i32" ]
160+ //
161+ /// `i32` is always stable in 1.0, even if you look at it from core.
162+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
163+ mod prim_i32 { }
164+
165+ //@ has stability/keyword.if.html \
166+ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0'
167+ #[ doc( keyword = "if" ) ]
168+ //
169+ /// We currently don't document stability for keywords, but let's test it anyway.
170+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
171+ mod if_keyword { }
0 commit comments