diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 2b28538c47d..7c25dcada71 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -101,7 +101,6 @@ #![feature(i128_type)] #![feature(inclusive_range)] #![feature(lang_items)] -#![feature(manually_drop)] #![feature(needs_allocator)] #![feature(nonzero)] #![feature(offset_to)] diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 86e5afa4c33..866296a5670 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -838,7 +838,6 @@ pub fn discriminant(v: &T) -> Discriminant { /// the type: /// /// ```rust -/// # #![feature(manually_drop)] /// use std::mem::ManuallyDrop; /// struct Peach; /// struct Banana; @@ -864,7 +863,7 @@ pub fn discriminant(v: &T) -> Discriminant { /// } /// } /// ``` -#[unstable(feature = "manually_drop", issue = "40673")] +#[stable(feature = "manually_drop", since = "1.20.0")] #[allow(unions_with_drop_fields)] pub union ManuallyDrop{ value: T } @@ -874,11 +873,10 @@ impl ManuallyDrop { /// # Examples /// /// ```rust - /// # #![feature(manually_drop)] /// use std::mem::ManuallyDrop; /// ManuallyDrop::new(Box::new(())); /// ``` - #[unstable(feature = "manually_drop", issue = "40673")] + #[stable(feature = "manually_drop", since = "1.20.0")] #[inline] pub fn new(value: T) -> ManuallyDrop { ManuallyDrop { value: value } @@ -889,12 +887,11 @@ impl ManuallyDrop { /// # Examples /// /// ```rust - /// # #![feature(manually_drop)] /// use std::mem::ManuallyDrop; /// let x = ManuallyDrop::new(Box::new(())); /// let _: Box<()> = ManuallyDrop::into_inner(x); /// ``` - #[unstable(feature = "manually_drop", issue = "40673")] + #[stable(feature = "manually_drop", since = "1.20.0")] #[inline] pub fn into_inner(slot: ManuallyDrop) -> T { unsafe { @@ -909,14 +906,14 @@ impl ManuallyDrop { /// This function runs the destructor of the contained value and thus the wrapped value /// now represents uninitialized data. It is up to the user of this method to ensure the /// uninitialized data is not actually used. - #[unstable(feature = "manually_drop", issue = "40673")] + #[stable(feature = "manually_drop", since = "1.20.0")] #[inline] pub unsafe fn drop(slot: &mut ManuallyDrop) { ptr::drop_in_place(&mut slot.value) } } -#[unstable(feature = "manually_drop", issue = "40673")] +#[stable(feature = "manually_drop", since = "1.20.0")] impl ::ops::Deref for ManuallyDrop { type Target = T; #[inline] @@ -927,7 +924,7 @@ impl ::ops::Deref for ManuallyDrop { } } -#[unstable(feature = "manually_drop", issue = "40673")] +#[stable(feature = "manually_drop", since = "1.20.0")] impl ::ops::DerefMut for ManuallyDrop { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { @@ -937,7 +934,7 @@ impl ::ops::DerefMut for ManuallyDrop { } } -#[unstable(feature = "manually_drop", issue = "40673")] +#[stable(feature = "manually_drop", since = "1.20.0")] impl ::fmt::Debug for ManuallyDrop { fn fmt(&self, fmt: &mut ::fmt::Formatter) -> ::fmt::Result { unsafe { diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 5d856597cad..eb766e71bf2 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -34,7 +34,6 @@ #![feature(conservative_impl_trait)] #![feature(discriminant_value)] #![feature(specialization)] -#![feature(manually_drop)] #![cfg_attr(stage0, feature(associated_consts))] #![cfg_attr(stage0, feature(struct_field_attributes))]