1
1
#![ feature( staged_api) ]
2
+ #![ feature( rustc_attrs) ]
3
+ #![ feature( rustdoc_internals) ]
2
4
3
- #![ stable( feature = "rust1 " , since = "1.0 .0" ) ]
5
+ #![ stable( feature = "core " , since = "1.6 .0" ) ]
4
6
5
7
//@ has stability/index.html
6
8
//@ has - '//ul[@class="item-table"]/li[1]//a' AaStable
@@ -26,60 +28,144 @@ pub struct ZzStable;
26
28
#[ unstable( feature = "unstable" , issue = "none" ) ]
27
29
pub mod unstable {
28
30
//@ !hasraw stability/unstable/struct.StableInUnstable.html \
29
- // '//span[@class="since"]'
31
+ // '//div[@class="main-heading"]// span[@class="since"]'
30
32
//@ has - '//div[@class="stab unstable"]' 'experimental'
31
33
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
32
34
pub struct StableInUnstable ;
33
35
34
36
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
35
37
pub mod stable_in_unstable {
36
38
//@ !hasraw stability/unstable/stable_in_unstable/struct.Inner.html \
37
- // '//span[@class="since"]'
39
+ // '//div[@class="main-heading"]// span[@class="since"]'
38
40
//@ has - '//div[@class="stab unstable"]' 'experimental'
39
41
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
40
42
pub struct Inner ;
41
43
}
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
+ }
42
69
}
43
70
44
71
#[ stable( feature = "rust2" , since = "2.2.2" ) ]
45
72
pub mod stable_later {
46
73
//@ 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'
48
75
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
49
76
pub struct StableInLater ;
50
77
51
78
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
52
79
pub mod stable_in_later {
53
80
//@ 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'
55
82
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
56
83
pub struct Inner ;
57
84
}
58
85
}
59
86
60
87
#[ 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'
64
122
#[ doc( inline) ]
65
123
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66
124
pub use crate :: unstable:: StableInUnstable ;
67
125
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'
70
128
#[ doc( inline) ]
71
129
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
72
130
pub use crate :: unstable:: stable_in_unstable;
73
131
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'
76
134
#[ doc( inline) ]
77
135
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
78
136
pub use crate :: stable_later:: StableInLater ;
79
137
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'
82
140
#[ doc( inline) ]
83
141
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
84
142
pub use crate :: stable_later:: stable_in_later;
85
143
}
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