@@ -148,8 +148,6 @@ fn main() {
148
148
149
149
*/
150
150
151
- #![ stable]
152
-
153
151
use core:: mem:: transmute;
154
152
use core:: cell:: Cell ;
155
153
use core:: clone:: Clone ;
@@ -173,7 +171,6 @@ struct RcBox<T> {
173
171
174
172
/// Immutable reference counted pointer type
175
173
#[ unsafe_no_drop_flag]
176
- #[ stable]
177
174
pub struct Rc < T > {
178
175
// FIXME #12808: strange names to try to avoid interfering with
179
176
// field accesses of the contained type via Deref
@@ -182,7 +179,6 @@ pub struct Rc<T> {
182
179
_noshare : marker:: NoShare
183
180
}
184
181
185
- #[ stable]
186
182
impl < T > Rc < T > {
187
183
/// Construct a new reference-counted box
188
184
pub fn new ( value : T ) -> Rc < T > {
@@ -207,7 +203,6 @@ impl<T> Rc<T> {
207
203
208
204
impl < T > Rc < T > {
209
205
/// Downgrade the reference-counted pointer to a weak reference
210
- #[ experimental = "Weak pointers may not belong in this module." ]
211
206
pub fn downgrade ( & self ) -> Weak < T > {
212
207
self . inc_weak ( ) ;
213
208
Weak {
@@ -243,7 +238,6 @@ impl<T: Clone> Rc<T> {
243
238
}
244
239
}
245
240
246
- #[ experimental = "Deref is experimental." ]
247
241
impl < T > Deref < T > for Rc < T > {
248
242
/// Borrow the value contained in the reference-counted box
249
243
#[ inline( always) ]
@@ -253,7 +247,6 @@ impl<T> Deref<T> for Rc<T> {
253
247
}
254
248
255
249
#[ unsafe_destructor]
256
- #[ experimental = "Drop is experimental." ]
257
250
impl < T > Drop for Rc < T > {
258
251
fn drop ( & mut self ) {
259
252
unsafe {
@@ -276,7 +269,7 @@ impl<T> Drop for Rc<T> {
276
269
}
277
270
}
278
271
279
- #[ unstable = "Clone is unstable." ]
272
+ #[ unstable]
280
273
impl < T > Clone for Rc < T > {
281
274
#[ inline]
282
275
fn clone ( & self ) -> Rc < T > {
@@ -285,26 +278,22 @@ impl<T> Clone for Rc<T> {
285
278
}
286
279
}
287
280
288
- #[ stable]
289
281
impl < T : Default > Default for Rc < T > {
290
282
#[ inline]
291
283
fn default ( ) -> Rc < T > {
292
284
Rc :: new ( Default :: default ( ) )
293
285
}
294
286
}
295
287
296
- #[ unstable = "PartialEq is unstable." ]
297
288
impl < T : PartialEq > PartialEq for Rc < T > {
298
289
#[ inline( always) ]
299
290
fn eq ( & self , other : & Rc < T > ) -> bool { * * self == * * other }
300
291
#[ inline( always) ]
301
292
fn ne ( & self , other : & Rc < T > ) -> bool { * * self != * * other }
302
293
}
303
294
304
- #[ unstable = "Eq is unstable." ]
305
295
impl < T : Eq > Eq for Rc < T > { }
306
296
307
- #[ unstable = "PartialOrd is unstable." ]
308
297
impl < T : PartialOrd > PartialOrd for Rc < T > {
309
298
#[ inline( always) ]
310
299
fn partial_cmp ( & self , other : & Rc < T > ) -> Option < Ordering > {
@@ -324,13 +313,11 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
324
313
fn ge ( & self , other : & Rc < T > ) -> bool { * * self >= * * other }
325
314
}
326
315
327
- #[ unstable = "Ord is unstable." ]
328
316
impl < T : Ord > Ord for Rc < T > {
329
317
#[ inline]
330
318
fn cmp ( & self , other : & Rc < T > ) -> Ordering { ( * * self ) . cmp ( & * * other) }
331
319
}
332
320
333
- #[ experimental = "Show is experimental." ]
334
321
impl < T : fmt:: Show > fmt:: Show for Rc < T > {
335
322
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
336
323
( * * self ) . fmt ( f)
@@ -339,7 +326,6 @@ impl<T: fmt::Show> fmt::Show for Rc<T> {
339
326
340
327
/// Weak reference to a reference-counted box
341
328
#[ unsafe_no_drop_flag]
342
- #[ experimental = "Weak pointers may not belong in this module." ]
343
329
pub struct Weak < T > {
344
330
// FIXME #12808: strange names to try to avoid interfering with
345
331
// field accesses of the contained type via Deref
@@ -348,7 +334,6 @@ pub struct Weak<T> {
348
334
_noshare : marker:: NoShare
349
335
}
350
336
351
- #[ experimental = "Weak pointers may not belong in this module." ]
352
337
impl < T > Weak < T > {
353
338
/// Upgrade a weak reference to a strong reference
354
339
pub fn upgrade ( & self ) -> Option < Rc < T > > {
@@ -362,7 +347,6 @@ impl<T> Weak<T> {
362
347
}
363
348
364
349
#[ unsafe_destructor]
365
- #[ experimental = "Weak pointers may not belong in this module." ]
366
350
impl < T > Drop for Weak < T > {
367
351
fn drop ( & mut self ) {
368
352
unsafe {
@@ -380,7 +364,6 @@ impl<T> Drop for Weak<T> {
380
364
}
381
365
382
366
#[ unstable]
383
- #[ experimental = "Weak pointers may not belong in this module." ]
384
367
impl < T > Clone for Weak < T > {
385
368
#[ inline]
386
369
fn clone ( & self ) -> Weak < T > {
0 commit comments