Skip to content

Commit f0b1326

Browse files
committedSep 11, 2015
std: Stabilize/deprecate features for 1.4
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
1 parent 79c6a4d commit f0b1326

File tree

31 files changed

+121
-140
lines changed

31 files changed

+121
-140
lines changed
 

Diff for: ‎src/liballoc/arc.rs

+13-17
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
137137
/// Weak pointers will not keep the data inside of the `Arc` alive, and can be
138138
/// used to break cycles between `Arc` pointers.
139139
#[unsafe_no_drop_flag]
140-
#[unstable(feature = "arc_weak", reason = "needs FCP", issue = "27718")]
140+
#[stable(feature = "arc_weak", since = "1.4.0")]
141141
pub struct Weak<T: ?Sized> {
142142
// FIXME #12808: strange name to try to avoid interfering with
143143
// field accesses of the contained type via Deref
@@ -201,7 +201,6 @@ impl<T> Arc<T> {
201201
/// # Examples
202202
///
203203
/// ```
204-
/// #![feature(arc_unique)]
205204
/// use std::sync::Arc;
206205
///
207206
/// let x = Arc::new(3);
@@ -212,7 +211,7 @@ impl<T> Arc<T> {
212211
/// assert_eq!(Arc::try_unwrap(x), Err(Arc::new(4)));
213212
/// ```
214213
#[inline]
215-
#[unstable(feature = "arc_unique", reason = "needs FCP", issue = "27718")]
214+
#[stable(feature = "arc_unique", since = "1.4.0")]
216215
pub fn try_unwrap(this: Self) -> Result<T, Self> {
217216
// See `drop` for why all these atomics are like this
218217
if this.inner().strong.compare_and_swap(1, 0, Release) != 1 { return Err(this) }
@@ -238,14 +237,13 @@ impl<T: ?Sized> Arc<T> {
238237
/// # Examples
239238
///
240239
/// ```
241-
/// #![feature(arc_weak)]
242240
/// use std::sync::Arc;
243241
///
244242
/// let five = Arc::new(5);
245243
///
246244
/// let weak_five = Arc::downgrade(&five);
247245
/// ```
248-
#[unstable(feature = "arc_weak", reason = "needs FCP", issue = "27718")]
246+
#[stable(feature = "arc_weak", since = "1.4.0")]
249247
pub fn downgrade(this: &Self) -> Weak<T> {
250248
loop {
251249
// This Relaxed is OK because we're checking the value in the CAS
@@ -270,14 +268,16 @@ impl<T: ?Sized> Arc<T> {
270268

271269
/// Get the number of weak references to this value.
272270
#[inline]
273-
#[unstable(feature = "arc_counts", reason = "not clearly useful, and racy", issue = "27718")]
271+
#[unstable(feature = "arc_counts", reason = "not clearly useful, and racy",
272+
issue = "28356")]
274273
pub fn weak_count(this: &Self) -> usize {
275274
this.inner().weak.load(SeqCst) - 1
276275
}
277276

278277
/// Get the number of strong references to this value.
279278
#[inline]
280-
#[unstable(feature = "arc_counts", reason = "not clearly useful, and racy", issue = "27718")]
279+
#[unstable(feature = "arc_counts", reason = "not clearly useful, and racy",
280+
issue = "28356")]
281281
pub fn strong_count(this: &Self) -> usize {
282282
this.inner().strong.load(SeqCst)
283283
}
@@ -366,7 +366,8 @@ impl<T: ?Sized> Deref for Arc<T> {
366366
}
367367

368368
impl<T: Clone> Arc<T> {
369-
#[unstable(feature = "arc_unique", reason = "renamed to Arc::make_mut", issue = "27718")]
369+
#[unstable(feature = "arc_make_unique", reason = "renamed to Arc::make_mut",
370+
issue = "27718")]
370371
#[deprecated(since = "1.4.0", reason = "renamed to Arc::make_mut")]
371372
pub fn make_unique(this: &mut Self) -> &mut T {
372373
Arc::make_mut(this)
@@ -381,7 +382,6 @@ impl<T: Clone> Arc<T> {
381382
/// # Examples
382383
///
383384
/// ```
384-
/// #![feature(arc_unique)]
385385
/// use std::sync::Arc;
386386
///
387387
/// let mut data = Arc::new(5);
@@ -398,7 +398,7 @@ impl<T: Clone> Arc<T> {
398398
///
399399
/// ```
400400
#[inline]
401-
#[unstable(feature = "arc_unique", reason = "needs FCP", issue = "27718")]
401+
#[stable(feature = "arc_unique", since = "1.4.0")]
402402
pub fn make_mut(this: &mut Self) -> &mut T {
403403
// Note that we hold both a strong reference and a weak reference.
404404
// Thus, releasing our strong reference only will not, by itself, cause
@@ -460,7 +460,6 @@ impl<T: ?Sized> Arc<T> {
460460
/// # Examples
461461
///
462462
/// ```
463-
/// #![feature(arc_unique)]
464463
/// use std::sync::Arc;
465464
///
466465
/// let mut x = Arc::new(3);
@@ -471,7 +470,7 @@ impl<T: ?Sized> Arc<T> {
471470
/// assert!(Arc::get_mut(&mut x).is_none());
472471
/// ```
473472
#[inline]
474-
#[unstable(feature = "arc_unique", reason = "needs FCP", issue = "27718")]
473+
#[stable(feature = "arc_unique", since = "1.4.0")]
475474
pub fn get_mut(this: &mut Self) -> Option<&mut T> {
476475
if this.is_unique() {
477476
// This unsafety is ok because we're guaranteed that the pointer
@@ -595,7 +594,6 @@ impl<T: ?Sized> Weak<T> {
595594
/// # Examples
596595
///
597596
/// ```
598-
/// #![feature(arc_weak)]
599597
/// use std::sync::Arc;
600598
///
601599
/// let five = Arc::new(5);
@@ -604,7 +602,7 @@ impl<T: ?Sized> Weak<T> {
604602
///
605603
/// let strong_five: Option<Arc<_>> = weak_five.upgrade();
606604
/// ```
607-
#[unstable(feature = "arc_weak", reason = "needs FCP", issue = "27718")]
605+
#[stable(feature = "arc_weak", since = "1.4.0")]
608606
pub fn upgrade(&self) -> Option<Arc<T>> {
609607
// We use a CAS loop to increment the strong count instead of a
610608
// fetch_add because once the count hits 0 it must never be above 0.
@@ -630,7 +628,7 @@ impl<T: ?Sized> Weak<T> {
630628
}
631629
}
632630

633-
#[unstable(feature = "arc_weak", reason = "needs FCP", issue = "27718")]
631+
#[stable(feature = "arc_weak", since = "1.4.0")]
634632
impl<T: ?Sized> Clone for Weak<T> {
635633
/// Makes a clone of the `Weak<T>`.
636634
///
@@ -639,7 +637,6 @@ impl<T: ?Sized> Clone for Weak<T> {
639637
/// # Examples
640638
///
641639
/// ```
642-
/// #![feature(arc_weak)]
643640
/// use std::sync::Arc;
644641
///
645642
/// let weak_five = Arc::downgrade(&Arc::new(5));
@@ -672,7 +669,6 @@ impl<T: ?Sized> Drop for Weak<T> {
672669
/// # Examples
673670
///
674671
/// ```
675-
/// #![feature(arc_weak)]
676672
/// use std::sync::Arc;
677673
///
678674
/// {

Diff for: ‎src/liballoc/boxed.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,8 @@ impl<T : ?Sized> Box<T> {
226226
/// Function is unsafe, because improper use of this function may
227227
/// lead to memory problems like double-free, for example if the
228228
/// function is called twice on the same raw pointer.
229-
#[unstable(feature = "box_raw",
230-
reason = "may be renamed or moved out of Box scope",
231-
issue = "27768")]
229+
#[stable(feature = "box_raw", since = "1.4.0")]
232230
#[inline]
233-
// NB: may want to be called from_ptr, see comments on CStr::from_ptr
234231
pub unsafe fn from_raw(raw: *mut T) -> Self {
235232
mem::transmute(raw)
236233
}
@@ -244,17 +241,14 @@ impl<T : ?Sized> Box<T> {
244241
/// `Box` does not specify, how memory is allocated.
245242
///
246243
/// # Examples
247-
/// ```
248-
/// #![feature(box_raw)]
249244
///
245+
/// ```
250246
/// let seventeen = Box::new(17u32);
251247
/// let raw = Box::into_raw(seventeen);
252248
/// let boxed_again = unsafe { Box::from_raw(raw) };
253249
/// ```
254-
#[unstable(feature = "box_raw", reason = "may be renamed",
255-
issue = "27768")]
250+
#[stable(feature = "box_raw", since = "1.4.0")]
256251
#[inline]
257-
// NB: may want to be called into_ptr, see comments on CStr::from_ptr
258252
pub fn into_raw(b: Box<T>) -> *mut T {
259253
unsafe { mem::transmute(b) }
260254
}
@@ -289,8 +283,6 @@ impl<T: Clone> Clone for Box<T> {
289283
/// # Examples
290284
///
291285
/// ```
292-
/// #![feature(box_raw)]
293-
///
294286
/// let x = Box::new(5);
295287
/// let mut y = Box::new(10);
296288
///

Diff for: ‎src/liballoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
#![cfg_attr(stage0, feature(alloc_system))]
101101
#![cfg_attr(not(stage0), feature(needs_allocator))]
102102

103-
#![cfg_attr(test, feature(test, rustc_private, box_raw))]
103+
#![cfg_attr(test, feature(test, rustc_private))]
104104

105105
#[cfg(stage0)]
106106
extern crate alloc_system;

Diff for: ‎src/liballoc/rc.rs

+18-26
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// FIXME(27718): rc_counts stuff is useful internally, but was previously public
1211
#![allow(deprecated)]
1312

1413
//! Thread-local reference-counted boxes (the `Rc<T>` type).
@@ -94,8 +93,6 @@
9493
//! documentation for more details on interior mutability.
9594
//!
9695
//! ```rust
97-
//! #![feature(rc_weak)]
98-
//!
9996
//! use std::rc::Rc;
10097
//! use std::rc::Weak;
10198
//! use std::cell::RefCell;
@@ -242,7 +239,7 @@ impl<T> Rc<T> {
242239
/// assert_eq!(Rc::try_unwrap(x), Err(Rc::new(4)));
243240
/// ```
244241
#[inline]
245-
#[unstable(feature = "rc_unique", reason= "needs FCP", issue = "27718")]
242+
#[stable(feature = "rc_unique", since = "1.4.0")]
246243
pub fn try_unwrap(this: Self) -> Result<T, Self> {
247244
if Rc::would_unwrap(&this) {
248245
unsafe {
@@ -263,8 +260,9 @@ impl<T> Rc<T> {
263260
}
264261

265262
/// Checks if `Rc::try_unwrap` would return `Ok`.
266-
#[unstable(feature = "rc_would_unwrap", reason = "just added for niche usecase",
267-
issue = "27718")]
263+
#[unstable(feature = "rc_would_unwrap",
264+
reason = "just added for niche usecase",
265+
issue = "28356")]
268266
pub fn would_unwrap(this: &Self) -> bool {
269267
Rc::strong_count(&this) == 1
270268
}
@@ -276,28 +274,28 @@ impl<T: ?Sized> Rc<T> {
276274
/// # Examples
277275
///
278276
/// ```
279-
/// #![feature(rc_weak)]
280-
///
281277
/// use std::rc::Rc;
282278
///
283279
/// let five = Rc::new(5);
284280
///
285281
/// let weak_five = Rc::downgrade(&five);
286282
/// ```
287-
#[unstable(feature = "rc_weak", reason = "needs FCP", issue = "27718")]
283+
#[stable(feature = "rc_weak", since = "1.4.0")]
288284
pub fn downgrade(this: &Self) -> Weak<T> {
289285
this.inc_weak();
290286
Weak { _ptr: this._ptr }
291287
}
292288

293289
/// Get the number of weak references to this value.
294290
#[inline]
295-
#[unstable(feature = "rc_counts", reason = "not clearly useful", issue = "27718")]
291+
#[unstable(feature = "rc_counts", reason = "not clearly useful",
292+
issue = "28356")]
296293
pub fn weak_count(this: &Self) -> usize { this.weak() - 1 }
297294

298295
/// Get the number of strong references to this value.
299296
#[inline]
300-
#[unstable(feature = "rc_counts", reason = "not clearly useful", issue = "27718")]
297+
#[unstable(feature = "rc_counts", reason = "not clearly useful",
298+
issue = "28356")]
301299
pub fn strong_count(this: &Self) -> usize { this.strong() }
302300

303301
/// Returns true if there are no other `Rc` or `Weak<T>` values that share
@@ -315,7 +313,8 @@ impl<T: ?Sized> Rc<T> {
315313
/// assert!(Rc::is_unique(&five));
316314
/// ```
317315
#[inline]
318-
#[unstable(feature = "rc_counts", reason = "uniqueness has unclear meaning", issue = "27718")]
316+
#[unstable(feature = "rc_counts", reason = "uniqueness has unclear meaning",
317+
issue = "28356")]
319318
pub fn is_unique(this: &Self) -> bool {
320319
Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1
321320
}
@@ -328,8 +327,6 @@ impl<T: ?Sized> Rc<T> {
328327
/// # Examples
329328
///
330329
/// ```
331-
/// #![feature(rc_unique)]
332-
///
333330
/// use std::rc::Rc;
334331
///
335332
/// let mut x = Rc::new(3);
@@ -340,7 +337,7 @@ impl<T: ?Sized> Rc<T> {
340337
/// assert!(Rc::get_mut(&mut x).is_none());
341338
/// ```
342339
#[inline]
343-
#[unstable(feature = "rc_unique", reason = "needs FCP", issue = "27718")]
340+
#[stable(feature = "rc_unique", since = "1.4.0")]
344341
pub fn get_mut(this: &mut Self) -> Option<&mut T> {
345342
if Rc::is_unique(this) {
346343
let inner = unsafe { &mut **this._ptr };
@@ -353,7 +350,8 @@ impl<T: ?Sized> Rc<T> {
353350

354351
impl<T: Clone> Rc<T> {
355352
#[inline]
356-
#[unstable(feature = "rc_unique", reason = "renamed to Rc::make_mut", issue = "27718")]
353+
#[unstable(feature = "rc_make_unique", reason = "renamed to Rc::make_mut",
354+
issue = "27718")]
357355
#[deprecated(since = "1.4.0", reason = "renamed to Rc::make_mut")]
358356
pub fn make_unique(&mut self) -> &mut T {
359357
Rc::make_mut(self)
@@ -385,7 +383,7 @@ impl<T: Clone> Rc<T> {
385383
///
386384
/// ```
387385
#[inline]
388-
#[unstable(feature = "rc_unique", reason = "needs FCP", issue = "27718")]
386+
#[stable(feature = "rc_unique", since = "1.4.0")]
389387
pub fn make_mut(this: &mut Self) -> &mut T {
390388
if Rc::strong_count(this) != 1 {
391389
// Gotta clone the data, there are other Rcs
@@ -693,7 +691,7 @@ impl<T> fmt::Pointer for Rc<T> {
693691
///
694692
/// See the [module level documentation](./index.html) for more.
695693
#[unsafe_no_drop_flag]
696-
#[unstable(feature = "rc_weak", reason = "needs FCP", issue = "27718")]
694+
#[stable(feature = "rc_weak", since = "1.4.0")]
697695
pub struct Weak<T: ?Sized> {
698696
// FIXME #12808: strange names to try to avoid interfering with
699697
// field accesses of the contained type via Deref
@@ -716,8 +714,6 @@ impl<T: ?Sized> Weak<T> {
716714
/// # Examples
717715
///
718716
/// ```
719-
/// #![feature(rc_weak)]
720-
///
721717
/// use std::rc::Rc;
722718
///
723719
/// let five = Rc::new(5);
@@ -726,7 +722,7 @@ impl<T: ?Sized> Weak<T> {
726722
///
727723
/// let strong_five: Option<Rc<_>> = weak_five.upgrade();
728724
/// ```
729-
#[unstable(feature = "rc_weak", reason = "needs FCP", issue = "27718")]
725+
#[stable(feature = "rc_weak", since = "1.4.0")]
730726
pub fn upgrade(&self) -> Option<Rc<T>> {
731727
if self.strong() == 0 {
732728
None
@@ -746,8 +742,6 @@ impl<T: ?Sized> Drop for Weak<T> {
746742
/// # Examples
747743
///
748744
/// ```
749-
/// #![feature(rc_weak)]
750-
///
751745
/// use std::rc::Rc;
752746
///
753747
/// {
@@ -783,7 +777,7 @@ impl<T: ?Sized> Drop for Weak<T> {
783777
}
784778
}
785779

786-
#[unstable(feature = "rc_weak", reason = "needs FCP", issue = "27718")]
780+
#[stable(feature = "rc_weak", since = "1.4.0")]
787781
impl<T: ?Sized> Clone for Weak<T> {
788782

789783
/// Makes a clone of the `Weak<T>`.
@@ -793,8 +787,6 @@ impl<T: ?Sized> Clone for Weak<T> {
793787
/// # Examples
794788
///
795789
/// ```
796-
/// #![feature(rc_weak)]
797-
///
798790
/// use std::rc::Rc;
799791
///
800792
/// let weak_five = Rc::downgrade(&Rc::new(5));

Diff for: ‎src/libcollections/btree/map.rs

+3
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ pub struct OccupiedEntry<'a, K:'a, V:'a> {
149149
impl<K: Ord, V> BTreeMap<K, V> {
150150
/// Makes a new empty BTreeMap with a reasonable choice for B.
151151
#[stable(feature = "rust1", since = "1.0.0")]
152+
#[allow(deprecated)]
152153
pub fn new() -> BTreeMap<K, V> {
153154
//FIXME(Gankro): Tune this as a function of size_of<K/V>?
154155
BTreeMap::with_b(6)
@@ -160,6 +161,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
160161
#[unstable(feature = "btree_b",
161162
reason = "probably want this to be on the type, eventually",
162163
issue = "27795")]
164+
#[deprecated(since = "1.4.0", reason = "niche API")]
163165
pub fn with_b(b: usize) -> BTreeMap<K, V> {
164166
assert!(b > 1, "B must be greater than 1");
165167
BTreeMap {
@@ -183,6 +185,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
183185
/// assert!(a.is_empty());
184186
/// ```
185187
#[stable(feature = "rust1", since = "1.0.0")]
188+
#[allow(deprecated)]
186189
pub fn clear(&mut self) {
187190
let b = self.b;
188191
// avoid recursive destructors by manually traversing the tree

Diff for: ‎src/libcollections/btree/set.rs

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ impl<T: Ord> BTreeSet<T> {
104104
#[unstable(feature = "btree_b",
105105
reason = "probably want this to be on the type, eventually",
106106
issue = "27795")]
107+
#[deprecated(since = "1.4.0", reason = "niche API")]
108+
#[allow(deprecated)]
107109
pub fn with_b(b: usize) -> BTreeSet<T> {
108110
BTreeSet { map: BTreeMap::with_b(b) }
109111
}

Diff for: ‎src/libcollections/str.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -515,16 +515,14 @@ impl str {
515515
/// assert_eq!(b, " 老虎 Léopard");
516516
/// ```
517517
#[inline]
518-
#[unstable(feature = "str_split_at", reason = "recently added",
519-
issue = "27792")]
518+
#[stable(feature = "str_split_at", since = "1.4.0")]
520519
pub fn split_at(&self, mid: usize) -> (&str, &str) {
521520
core_str::StrExt::split_at(self, mid)
522521
}
523522

524523
/// Divide one mutable string slice into two at an index.
525524
#[inline]
526-
#[unstable(feature = "str_split_at", reason = "recently added",
527-
issue = "27792")]
525+
#[stable(feature = "str_split_at", since = "1.4.0")]
528526
pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
529527
core_str::StrExt::split_at_mut(self, mid)
530528
}
@@ -1505,9 +1503,7 @@ impl str {
15051503
}
15061504

15071505
/// Converts the `Box<str>` into a `String` without copying or allocating.
1508-
#[unstable(feature = "box_str",
1509-
reason = "recently added, matches RFC",
1510-
issue = "27785")]
1506+
#[stable(feature = "box_str", since = "1.4.0")]
15111507
pub fn into_string(self: Box<str>) -> String {
15121508
unsafe {
15131509
let slice = mem::transmute::<Box<str>, Box<[u8]>>(self);

Diff for: ‎src/libcollections/string.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,7 @@ impl String {
722722
/// Converts the string into `Box<str>`.
723723
///
724724
/// Note that this will drop any excess capacity.
725-
#[unstable(feature = "box_str",
726-
reason = "recently added, matches RFC",
727-
issue = "27785")]
725+
#[stable(feature = "box_str", since = "1.4.0")]
728726
pub fn into_boxed_str(self) -> Box<str> {
729727
let slice = self.vec.into_boxed_slice();
730728
unsafe { mem::transmute::<Box<[u8]>, Box<str>>(slice) }
@@ -733,7 +731,7 @@ impl String {
733731
/// Converts the string into `Box<str>`.
734732
///
735733
/// Note that this will drop any excess capacity.
736-
#[unstable(feature = "box_str",
734+
#[unstable(feature = "box_str2",
737735
reason = "recently added, matches RFC",
738736
issue = "27785")]
739737
#[deprecated(since = "1.4.0", reason = "renamed to `into_boxed_str`")]

Diff for: ‎src/libcollections/vec.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -614,18 +614,14 @@ impl<T> Vec<T> {
614614
/// # Examples
615615
///
616616
/// ```
617-
/// #![feature(append)]
618-
///
619617
/// let mut vec = vec![1, 2, 3];
620618
/// let mut vec2 = vec![4, 5, 6];
621619
/// vec.append(&mut vec2);
622620
/// assert_eq!(vec, [1, 2, 3, 4, 5, 6]);
623621
/// assert_eq!(vec2, []);
624622
/// ```
625623
#[inline]
626-
#[unstable(feature = "append",
627-
reason = "new API, waiting for dust to settle",
628-
issue = "27765")]
624+
#[stable(feature = "append", since = "1.4.0")]
629625
pub fn append(&mut self, other: &mut Self) {
630626
self.reserve(other.len());
631627
let len = self.len();
@@ -765,9 +761,7 @@ impl<T> Vec<T> {
765761
/// assert_eq!(vec2, [2, 3]);
766762
/// ```
767763
#[inline]
768-
#[unstable(feature = "split_off",
769-
reason = "new API, waiting for dust to settle",
770-
issue = "27766")]
764+
#[stable(feature = "split_off", since = "1.4.0")]
771765
pub fn split_off(&mut self, at: usize) -> Self {
772766
assert!(at <= self.len(), "`at` out of bounds");
773767

Diff for: ‎src/libcollections/vec_deque.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -1322,9 +1322,7 @@ impl<T> VecDeque<T> {
13221322
/// assert_eq!(buf2.len(), 2);
13231323
/// ```
13241324
#[inline]
1325-
#[unstable(feature = "split_off",
1326-
reason = "new API, waiting for dust to settle",
1327-
issue = "27766")]
1325+
#[stable(feature = "split_off", since = "1.4.0")]
13281326
pub fn split_off(&mut self, at: usize) -> Self {
13291327
let len = self.len();
13301328
assert!(at <= len, "`at` out of bounds");
@@ -1376,8 +1374,6 @@ impl<T> VecDeque<T> {
13761374
/// # Examples
13771375
///
13781376
/// ```
1379-
/// #![feature(append)]
1380-
///
13811377
/// use std::collections::VecDeque;
13821378
///
13831379
/// let mut buf: VecDeque<_> = vec![1, 2, 3].into_iter().collect();
@@ -1387,9 +1383,7 @@ impl<T> VecDeque<T> {
13871383
/// assert_eq!(buf2.len(), 0);
13881384
/// ```
13891385
#[inline]
1390-
#[unstable(feature = "append",
1391-
reason = "new API, waiting for dust to settle",
1392-
issue = "27765")]
1386+
#[stable(feature = "append", since = "1.4.0")]
13931387
pub fn append(&mut self, other: &mut Self) {
13941388
// naive impl
13951389
self.extend(other.drain());
@@ -1415,9 +1409,7 @@ impl<T> VecDeque<T> {
14151409
/// let v: Vec<_> = buf.into_iter().collect();
14161410
/// assert_eq!(&v[..], &[2, 4]);
14171411
/// ```
1418-
#[unstable(feature = "vec_deque_retain",
1419-
reason = "new API, waiting for dust to settle",
1420-
issue = "27767")]
1412+
#[stable(feature = "vec_deque_retain", since = "1.4.0")]
14211413
pub fn retain<F>(&mut self, mut f: F) where F: FnMut(&T) -> bool {
14221414
let len = self.len();
14231415
let mut del = 0;

Diff for: ‎src/libcore/option.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ impl<T> Option<T> {
289289
#[unstable(feature = "as_slice",
290290
reason = "waiting for mut conventions",
291291
issue = "27776")]
292+
#[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")]
292293
pub fn as_mut_slice(&mut self) -> &mut [T] {
293294
match *self {
294295
Some(ref mut x) => {
@@ -690,8 +691,9 @@ impl<T> Option<T> {
690691

691692
/// Converts from `Option<T>` to `&[T]` (without copying)
692693
#[inline]
693-
#[unstable(feature = "as_slice", since = "unsure of the utility here",
694+
#[unstable(feature = "as_slice", reason = "unsure of the utility here",
694695
issue = "27776")]
696+
#[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")]
695697
pub fn as_slice(&self) -> &[T] {
696698
match *self {
697699
Some(ref x) => slice::ref_slice(x),

Diff for: ‎src/libcore/result.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@ impl<T, E> Result<T, E> {
405405

406406
/// Converts from `Result<T, E>` to `&[T]` (without copying)
407407
#[inline]
408-
#[unstable(feature = "as_slice", since = "unsure of the utility here",
408+
#[unstable(feature = "as_slice", reason = "unsure of the utility here",
409409
issue = "27776")]
410+
#[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")]
410411
pub fn as_slice(&self) -> &[T] {
411412
match *self {
412413
Ok(ref x) => slice::ref_slice(x),
@@ -439,6 +440,7 @@ impl<T, E> Result<T, E> {
439440
#[unstable(feature = "as_slice",
440441
reason = "waiting for mut conventions",
441442
issue = "27776")]
443+
#[deprecated(since = "1.4.0", reason = "niche API, unclear of usefulness")]
442444
pub fn as_mut_slice(&mut self) -> &mut [T] {
443445
match *self {
444446
Ok(ref mut x) => slice::mut_ref_slice(x),
@@ -742,12 +744,11 @@ impl<T, E: fmt::Debug> Result<T, E> {
742744
///
743745
/// # Examples
744746
/// ```{.should_panic}
745-
/// #![feature(result_expect)]
746747
/// let x: Result<u32, &str> = Err("emergency failure");
747748
/// x.expect("Testing expect"); // panics with `Testing expect: emergency failure`
748749
/// ```
749750
#[inline]
750-
#[unstable(feature = "result_expect", reason = "newly introduced", issue = "27277")]
751+
#[stable(feature = "result_expect", since = "1.4.0")]
751752
pub fn expect(self, msg: &str) -> T {
752753
match self {
753754
Ok(t) => t,

Diff for: ‎src/libcore/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl<'a, T> Iter<'a, T> {
800800
///
801801
/// This has the same lifetime as the original slice, and so the
802802
/// iterator can continue to be used while this exists.
803-
#[unstable(feature = "iter_to_slice", issue = "27775")]
803+
#[stable(feature = "iter_to_slice", since = "1.4.0")]
804804
pub fn as_slice(&self) -> &'a [T] {
805805
make_slice!(self.ptr, self.end)
806806
}
@@ -848,7 +848,7 @@ impl<'a, T> IterMut<'a, T> {
848848
/// to consume the iterator. Consider using the `Slice` and
849849
/// `SliceMut` implementations for obtaining slices with more
850850
/// restricted lifetimes that do not consume the iterator.
851-
#[unstable(feature = "iter_to_slice", issue = "27775")]
851+
#[stable(feature = "iter_to_slice", since = "1.4.0")]
852852
pub fn into_slice(self) -> &'a mut [T] {
853853
make_mut_slice!(self.ptr, self.end)
854854
}

Diff for: ‎src/libcore/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl<'a> Chars<'a> {
297297
///
298298
/// This has the same lifetime as the original slice, and so the
299299
/// iterator can continue to be used while this exists.
300-
#[unstable(feature = "iter_to_slice", issue = "27775")]
300+
#[stable(feature = "iter_to_slice", since = "1.4.0")]
301301
#[inline]
302302
pub fn as_str(&self) -> &'a str {
303303
unsafe { from_utf8_unchecked(self.iter.as_slice()) }
@@ -356,7 +356,7 @@ impl<'a> CharIndices<'a> {
356356
///
357357
/// This has the same lifetime as the original slice, and so the
358358
/// iterator can continue to be used while this exists.
359-
#[unstable(feature = "iter_to_slice", issue = "27775")]
359+
#[stable(feature = "iter_to_slice", since = "1.4.0")]
360360
#[inline]
361361
pub fn as_str(&self) -> &'a str {
362362
self.iter.as_str()

Diff for: ‎src/libcoretest/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#![feature(rand)]
3434
#![feature(range_inclusive)]
3535
#![feature(raw)]
36-
#![feature(result_expect)]
3736
#![feature(slice_bytes)]
3837
#![feature(slice_patterns)]
3938
#![feature(step_by)]

Diff for: ‎src/liblog/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
html_playground_url = "https://play.rust-lang.org/")]
171171
#![deny(missing_docs)]
172172

173-
#![feature(box_raw)]
174173
#![feature(box_syntax)]
175174
#![feature(const_fn)]
176175
#![feature(iter_cmp)]

Diff for: ‎src/librustc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2626
html_root_url = "https://doc.rust-lang.org/nightly/")]
2727

28-
#![feature(append)]
2928
#![feature(associated_consts)]
3029
#![feature(box_patterns)]
3130
#![feature(box_syntax)]

Diff for: ‎src/librustc_resolve/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#![feature(rustc_private)]
2626
#![feature(slice_splits)]
2727
#![feature(staged_api)]
28-
#![feature(rc_weak)]
2928

3029
#[macro_use] extern crate log;
3130
#[macro_use] extern crate syntax;

Diff for: ‎src/librustc_trans/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#![feature(unicode)]
4343
#![feature(unicode)]
4444
#![feature(vec_push_all)]
45-
#![feature(rc_weak)]
4645

4746
#![allow(trivial_casts)]
4847

Diff for: ‎src/librustc_typeck/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ This API is completely unstable and subject to change.
7575

7676
#![allow(non_camel_case_types)]
7777

78-
#![feature(append)]
7978
#![feature(box_patterns)]
8079
#![feature(box_syntax)]
8180
#![feature(drain)]

Diff for: ‎src/libstd/ffi/c_str.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub struct CString {
119119
/// Converting a foreign C string into a Rust `String`
120120
///
121121
/// ```no_run
122-
/// # #![feature(libc,cstr_to_str)]
122+
/// # #![feature(libc)]
123123
/// extern crate libc;
124124
/// use std::ffi::CStr;
125125
///
@@ -205,7 +205,7 @@ impl CString {
205205
/// The only appropriate argument is a pointer obtained by calling
206206
/// `into_ptr`. The length of the string will be recalculated
207207
/// using the pointer.
208-
#[unstable(feature = "cstr_memory", reason = "recently added",
208+
#[unstable(feature = "cstr_memory2", reason = "recently added",
209209
issue = "27769")]
210210
#[deprecated(since = "1.4.0", reason = "renamed to from_raw")]
211211
pub unsafe fn from_ptr(ptr: *const libc::c_char) -> CString {
@@ -217,8 +217,7 @@ impl CString {
217217
/// The only appropriate argument is a pointer obtained by calling
218218
/// `into_raw`. The length of the string will be recalculated
219219
/// using the pointer.
220-
#[unstable(feature = "cstr_memory", reason = "recently added",
221-
issue = "27769")]
220+
#[stable(feature = "cstr_memory", since = "1.4.0")]
222221
pub unsafe fn from_raw(ptr: *mut libc::c_char) -> CString {
223222
let len = libc::strlen(ptr) + 1; // Including the NUL byte
224223
let slice = slice::from_raw_parts(ptr, len as usize);
@@ -233,7 +232,7 @@ impl CString {
233232
/// this string.
234233
///
235234
/// Failure to call `from_raw` will lead to a memory leak.
236-
#[unstable(feature = "cstr_memory", reason = "recently added",
235+
#[unstable(feature = "cstr_memory2", reason = "recently added",
237236
issue = "27769")]
238237
#[deprecated(since = "1.4.0", reason = "renamed to into_raw")]
239238
pub fn into_ptr(self) -> *const libc::c_char {
@@ -248,8 +247,7 @@ impl CString {
248247
/// this string.
249248
///
250249
/// Failure to call `from_ptr` will lead to a memory leak.
251-
#[unstable(feature = "cstr_memory", reason = "recently added",
252-
issue = "27769")]
250+
#[stable(feature = "cstr_memory", since = "1.4.0")]
253251
pub fn into_raw(self) -> *mut libc::c_char {
254252
Box::into_raw(self.inner) as *mut libc::c_char
255253
}
@@ -429,8 +427,7 @@ impl CStr {
429427
/// > after a 0-cost cast, but it is planned to alter its definition in the
430428
/// > future to perform the length calculation in addition to the UTF-8
431429
/// > check whenever this method is called.
432-
#[unstable(feature = "cstr_to_str", reason = "recently added",
433-
issue = "27764")]
430+
#[stable(feature = "cstr_to_str", since = "1.4.0")]
434431
pub fn to_str(&self) -> Result<&str, str::Utf8Error> {
435432
// NB: When CStr is changed to perform the length check in .to_bytes()
436433
// instead of in from_ptr(), it may be worth considering if this should
@@ -450,8 +447,7 @@ impl CStr {
450447
/// > after a 0-cost cast, but it is planned to alter its definition in the
451448
/// > future to perform the length calculation in addition to the UTF-8
452449
/// > check whenever this method is called.
453-
#[unstable(feature = "cstr_to_str", reason = "recently added",
454-
issue = "27764")]
450+
#[stable(feature = "cstr_to_str", since = "1.4.0")]
455451
pub fn to_string_lossy(&self) -> Cow<str> {
456452
String::from_utf8_lossy(self.to_bytes())
457453
}

Diff for: ‎src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@
203203
#![feature(allow_internal_unstable)]
204204
#![feature(associated_consts)]
205205
#![feature(borrow_state)]
206-
#![feature(box_raw)]
207206
#![feature(box_syntax)]
208207
#![feature(char_from_unchecked)]
209208
#![feature(char_internals)]

Diff for: ‎src/libstd/net/tcp.rs

+16-8
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,13 @@ impl TcpStream {
130130
/// If the value specified is `None`, then `read` calls will block
131131
/// indefinitely. It is an error to pass the zero `Duration` to this
132132
/// method.
133-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
134-
issue = "27773")]
133+
///
134+
/// # Note
135+
///
136+
/// Platforms may return a different error code whenever a read times out as
137+
/// a result of setting this option. For example Unix typically returns an
138+
/// error of the kind `WouldBlock`, but Windows may return `TimedOut`.
139+
#[stable(feature = "socket_timeout", since = "1.4.0")]
135140
pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
136141
self.0.set_read_timeout(dur)
137142
}
@@ -141,8 +146,13 @@ impl TcpStream {
141146
/// If the value specified is `None`, then `write` calls will block
142147
/// indefinitely. It is an error to pass the zero `Duration` to this
143148
/// method.
144-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
145-
issue = "27773")]
149+
///
150+
/// # Note
151+
///
152+
/// Platforms may return a different error code whenever a write times out
153+
/// as a result of setting this option. For example Unix typically returns
154+
/// an error of the kind `WouldBlock`, but Windows may return `TimedOut`.
155+
#[stable(feature = "socket_timeout", since = "1.4.0")]
146156
pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
147157
self.0.set_write_timeout(dur)
148158
}
@@ -154,8 +164,7 @@ impl TcpStream {
154164
/// # Note
155165
///
156166
/// Some platforms do not provide access to the current timeout.
157-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
158-
issue = "27773")]
167+
#[stable(feature = "socket_timeout", since = "1.4.0")]
159168
pub fn read_timeout(&self) -> io::Result<Option<Duration>> {
160169
self.0.read_timeout()
161170
}
@@ -167,8 +176,7 @@ impl TcpStream {
167176
/// # Note
168177
///
169178
/// Some platforms do not provide access to the current timeout.
170-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
171-
issue = "27773")]
179+
#[stable(feature = "socket_timeout", since = "1.4.0")]
172180
pub fn write_timeout(&self) -> io::Result<Option<Duration>> {
173181
self.0.write_timeout()
174182
}

Diff for: ‎src/libstd/net/udp.rs

+16-8
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,13 @@ impl UdpSocket {
9797
/// If the value specified is `None`, then `read` calls will block
9898
/// indefinitely. It is an error to pass the zero `Duration` to this
9999
/// method.
100-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
101-
issue = "27773")]
100+
///
101+
/// # Note
102+
///
103+
/// Platforms may return a different error code whenever a read times out as
104+
/// a result of setting this option. For example Unix typically returns an
105+
/// error of the kind `WouldBlock`, but Windows may return `TimedOut`.
106+
#[stable(feature = "socket_timeout", since = "1.4.0")]
102107
pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
103108
self.0.set_read_timeout(dur)
104109
}
@@ -108,26 +113,29 @@ impl UdpSocket {
108113
/// If the value specified is `None`, then `write` calls will block
109114
/// indefinitely. It is an error to pass the zero `Duration` to this
110115
/// method.
111-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
112-
issue = "27773")]
116+
///
117+
/// # Note
118+
///
119+
/// Platforms may return a different error code whenever a write times out
120+
/// as a result of setting this option. For example Unix typically returns
121+
/// an error of the kind `WouldBlock`, but Windows may return `TimedOut`.
122+
#[stable(feature = "socket_timeout", since = "1.4.0")]
113123
pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
114124
self.0.set_write_timeout(dur)
115125
}
116126

117127
/// Returns the read timeout of this socket.
118128
///
119129
/// If the timeout is `None`, then `read` calls will block indefinitely.
120-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
121-
issue = "27773")]
130+
#[stable(feature = "socket_timeout", since = "1.4.0")]
122131
pub fn read_timeout(&self) -> io::Result<Option<Duration>> {
123132
self.0.read_timeout()
124133
}
125134

126135
/// Returns the write timeout of this socket.
127136
///
128137
/// If the timeout is `None`, then `write` calls will block indefinitely.
129-
#[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added",
130-
issue = "27773")]
138+
#[stable(feature = "socket_timeout", since = "1.4.0")]
131139
pub fn write_timeout(&self) -> io::Result<Option<Duration>> {
132140
self.0.write_timeout()
133141
}

Diff for: ‎src/libstd/num/f32.rs

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ impl f32 {
125125
/// Parses a float as with a given radix
126126
#[unstable(feature = "float_from_str_radix", reason = "recently moved API",
127127
issue = "27736")]
128+
#[deprecated(since = "1.4.0",
129+
reason = "unclear how useful or correct this is")]
128130
pub fn from_str_radix(s: &str, radix: u32) -> Result<f32, ParseFloatError> {
129131
num::Float::from_str_radix(s, radix)
130132
}

Diff for: ‎src/libstd/num/f64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ impl f64 {
8282
/// Parses a float as with a given radix
8383
#[unstable(feature = "float_from_str_radix", reason = "recently moved API",
8484
issue = "27736")]
85+
#[deprecated(since = "1.4.0",
86+
reason = "unclear how useful or correct this is")]
8587
pub fn from_str_radix(s: &str, radix: u32) -> Result<f64, ParseFloatError> {
8688
num::Float::from_str_radix(s, radix)
8789
}

Diff for: ‎src/libstd/primitive_docs.rs

-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ mod prim_unit { }
111111
/// the raw pointer. It doesn't destroy `T` or deallocate any memory.
112112
///
113113
/// ```
114-
/// #![feature(box_raw)]
115-
///
116114
/// let my_speed: Box<i32> = Box::new(88);
117115
/// let my_speed: *mut i32 = Box::into_raw(my_speed);
118116
///

Diff for: ‎src/libstd/sys/unix/ext/io.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ pub trait FromRawFd {
6161

6262
/// A trait to express the ability to consume an object and acquire ownership of
6363
/// its raw file descriptor.
64-
#[unstable(feature = "into_raw_os", reason = "recently added API",
65-
issue = "27797")]
64+
#[stable(feature = "into_raw_os", since = "1.4.0")]
6665
pub trait IntoRawFd {
6766
/// Consumes this object, returning the raw underlying file descriptor.
6867
///
6968
/// This function **transfers ownership** of the underlying file descriptor
7069
/// to the caller. Callers are then the unique owners of the file descriptor
7170
/// and must close the descriptor once it's no longer needed.
71+
#[stable(feature = "into_raw_os", since = "1.4.0")]
7272
fn into_raw_fd(self) -> RawFd;
7373
}
7474

@@ -84,6 +84,7 @@ impl FromRawFd for fs::File {
8484
fs::File::from_inner(sys::fs::File::from_inner(fd))
8585
}
8686
}
87+
#[stable(feature = "into_raw_os", since = "1.4.0")]
8788
impl IntoRawFd for fs::File {
8889
fn into_raw_fd(self) -> RawFd {
8990
self.into_inner().into_fd().into_raw()
@@ -125,16 +126,19 @@ impl FromRawFd for net::UdpSocket {
125126
}
126127
}
127128

129+
#[stable(feature = "into_raw_os", since = "1.4.0")]
128130
impl IntoRawFd for net::TcpStream {
129131
fn into_raw_fd(self) -> RawFd {
130132
self.into_inner().into_socket().into_inner()
131133
}
132134
}
135+
#[stable(feature = "into_raw_os", since = "1.4.0")]
133136
impl IntoRawFd for net::TcpListener {
134137
fn into_raw_fd(self) -> RawFd {
135138
self.into_inner().into_socket().into_inner()
136139
}
137140
}
141+
#[stable(feature = "into_raw_os", since = "1.4.0")]
138142
impl IntoRawFd for net::UdpSocket {
139143
fn into_raw_fd(self) -> RawFd {
140144
self.into_inner().into_socket().into_inner()

Diff for: ‎src/libstd/sys/windows/ext/io.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ pub trait FromRawHandle {
5252

5353
/// A trait to express the ability to consume an object and acquire ownership of
5454
/// its raw `HANDLE`.
55-
#[unstable(feature = "into_raw_os", reason = "recently added API",
56-
issue = "27797")]
55+
#[stable(feature = "into_raw_os", since = "1.4.0")]
5756
pub trait IntoRawHandle {
5857
/// Consumes this object, returning the raw underlying handle.
5958
///
6059
/// This function **transfers ownership** of the underlying handle to the
6160
/// caller. Callers are then the unique owners of the handle and must close
6261
/// it once it's no longer needed.
62+
#[stable(feature = "into_raw_os", since = "1.4.0")]
6363
fn into_raw_handle(self) -> RawHandle;
6464
}
6565

@@ -78,6 +78,7 @@ impl FromRawHandle for fs::File {
7878
}
7979
}
8080

81+
#[stable(feature = "into_raw_os", since = "1.4.0")]
8182
impl IntoRawHandle for fs::File {
8283
fn into_raw_handle(self) -> RawHandle {
8384
self.into_inner().into_handle().into_raw() as *mut _
@@ -111,14 +112,14 @@ pub trait FromRawSocket {
111112

112113
/// A trait to express the ability to consume an object and acquire ownership of
113114
/// its raw `SOCKET`.
114-
#[unstable(feature = "into_raw_os", reason = "recently added API",
115-
issue = "27797")]
115+
#[stable(feature = "into_raw_os", since = "1.4.0")]
116116
pub trait IntoRawSocket {
117117
/// Consumes this object, returning the raw underlying socket.
118118
///
119119
/// This function **transfers ownership** of the underlying socket to the
120120
/// caller. Callers are then the unique owners of the socket and must close
121121
/// it once it's no longer needed.
122+
#[stable(feature = "into_raw_os", since = "1.4.0")]
122123
fn into_raw_socket(self) -> RawSocket;
123124
}
124125

@@ -163,18 +164,21 @@ impl FromRawSocket for net::UdpSocket {
163164
}
164165
}
165166

167+
#[stable(feature = "into_raw_os", since = "1.4.0")]
166168
impl IntoRawSocket for net::TcpStream {
167169
fn into_raw_socket(self) -> RawSocket {
168170
self.into_inner().into_socket().into_inner()
169171
}
170172
}
171173

174+
#[stable(feature = "into_raw_os", since = "1.4.0")]
172175
impl IntoRawSocket for net::TcpListener {
173176
fn into_raw_socket(self) -> RawSocket {
174177
self.into_inner().into_socket().into_inner()
175178
}
176179
}
177180

181+
#[stable(feature = "into_raw_os", since = "1.4.0")]
178182
impl IntoRawSocket for net::UdpSocket {
179183
fn into_raw_socket(self) -> RawSocket {
180184
self.into_inner().into_socket().into_inner()

Diff for: ‎src/libstd/thread/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,7 @@ pub fn sleep_ms(ms: u32) {
410410
/// signal being received or a spurious wakeup. Platforms which do not support
411411
/// nanosecond precision for sleeping will have `dur` rounded up to the nearest
412412
/// granularity of time they can sleep for.
413-
#[unstable(feature = "thread_sleep", reason = "waiting on Duration",
414-
issue = "27771")]
413+
#[stable(feature = "thread_sleep", since = "1.4.0")]
415414
pub fn sleep(dur: Duration) {
416415
imp::Thread::sleep(dur)
417416
}
@@ -481,8 +480,7 @@ pub fn park_timeout_ms(ms: u32) {
481480
///
482481
/// Platforms which do not support nanosecond precision for sleeping will have
483482
/// `dur` rounded up to the nearest granularity of time they can sleep for.
484-
#[unstable(feature = "park_timeout", reason = "waiting on Duration",
485-
issue = "27771")]
483+
#[stable(feature = "park_timeout", since = "1.4.0")]
486484
pub fn park_timeout(dur: Duration) {
487485
let thread = current();
488486
let mut guard = thread.inner.lock.lock().unwrap();

Diff for: ‎src/test/run-pass/std-sync-right-kind-impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// pretty-expanded FIXME #23616
1212

1313
#![feature(static_mutex, static_rwlock, static_condvar)]
14-
#![feature(arc_weak, semaphore)]
14+
#![feature(semaphore)]
1515

1616
use std::sync;
1717

0 commit comments

Comments
 (0)
Please sign in to comment.