diff --git a/src/doc/unstable-book/src/language-features/compile-error.md b/src/doc/unstable-book/src/language-features/compile-error.md deleted file mode 100644 index 4de631e1fb3..00000000000 --- a/src/doc/unstable-book/src/language-features/compile-error.md +++ /dev/null @@ -1,20 +0,0 @@ -# `compile_error` - -The tracking issue for this feature is: [#40872] - -[#40872]: https://github.com/rust-lang/rust/issues/40872 - ------------------------- - -The `compile_error` feature adds a macro which will generate a compilation -error with the specified error message. - -## Examples - -```rust,compile_fail -#![feature(compile_error)] - -fn main() { - compile_error!("The error message"); //ERROR The error message -} -``` diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 91653f87a30..227fcfabcf1 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -79,11 +79,9 @@ #![cfg_attr(test, allow(deprecated))] // rand #![cfg_attr(test, feature(placement_in))] -#![cfg_attr(not(test), feature(char_escape_debug))] #![cfg_attr(not(test), feature(core_float))] #![cfg_attr(not(test), feature(exact_size_is_empty))] #![cfg_attr(not(test), feature(slice_rotate))] -#![cfg_attr(not(test), feature(str_checked_slicing))] #![cfg_attr(test, feature(rand, test))] #![feature(allow_internal_unstable)] #![feature(box_patterns)] @@ -102,7 +100,6 @@ #![feature(i128_type)] #![feature(inclusive_range)] #![feature(lang_items)] -#![feature(manually_drop)] #![feature(needs_allocator)] #![feature(nonzero)] #![feature(offset_to)] @@ -117,7 +114,6 @@ #![feature(specialization)] #![feature(staged_api)] #![feature(str_internals)] -#![feature(str_mut_extras)] #![feature(trusted_len)] #![feature(unboxed_closures)] #![feature(unicode)] diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f56288c3013..4df13c509a8 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -290,7 +290,7 @@ impl str { } /// Converts a mutable string slice to a mutable byte slice. - #[unstable(feature = "str_mut_extras", issue = "41119")] + #[stable(feature = "str_mut_extras", since = "1.20.0")] #[inline(always)] pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8] { core_str::StrExt::as_bytes_mut(self) @@ -328,14 +328,13 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let v = "🗻∈🌏"; /// assert_eq!(Some("🗻"), v.get(0..4)); /// assert!(v.get(1..).is_none()); /// assert!(v.get(..8).is_none()); /// assert!(v.get(..42).is_none()); /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub fn get>(&self, i: I) -> Option<&I::Output> { core_str::StrExt::get(self, i) @@ -351,14 +350,13 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let mut v = String::from("🗻∈🌏"); /// assert_eq!(Some("🗻"), v.get_mut(0..4).map(|v| &*v)); /// assert!(v.get_mut(1..).is_none()); /// assert!(v.get_mut(..8).is_none()); /// assert!(v.get_mut(..42).is_none()); /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub fn get_mut>(&mut self, i: I) -> Option<&mut I::Output> { core_str::StrExt::get_mut(self, i) @@ -383,7 +381,6 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let v = "🗻∈🌏"; /// unsafe { /// assert_eq!("🗻", v.get_unchecked(0..4)); @@ -391,7 +388,7 @@ impl str { /// assert_eq!("🌏", v.get_unchecked(7..11)); /// } /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub unsafe fn get_unchecked>(&self, i: I) -> &I::Output { core_str::StrExt::get_unchecked(self, i) @@ -416,7 +413,6 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let mut v = String::from("🗻∈🌏"); /// unsafe { /// assert_eq!("🗻", v.get_unchecked_mut(0..4)); @@ -424,7 +420,7 @@ impl str { /// assert_eq!("🌏", v.get_unchecked_mut(7..11)); /// } /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub unsafe fn get_unchecked_mut>(&mut self, i: I) -> &mut I::Output { core_str::StrExt::get_unchecked_mut(self, i) @@ -1729,7 +1725,7 @@ impl str { } /// Converts a `Box` into a `Box<[u8]>` without copying or allocating. - #[unstable(feature = "str_box_extras", issue = "41119")] + #[stable(feature = "str_box_extras", since = "1.20.0")] pub fn into_boxed_bytes(self: Box) -> Box<[u8]> { self.into() } @@ -1996,7 +1992,7 @@ impl str { /// Converts a boxed slice of bytes to a boxed string slice without checking /// that the string contains valid UTF-8. -#[unstable(feature = "str_box_extras", issue = "41119")] +#[stable(feature = "str_box_extras", since = "1.20.0")] pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box { mem::transmute(v) } diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index c6d70ee7575..27b23d14059 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -24,12 +24,10 @@ #![feature(repr_align)] #![feature(slice_rotate)] #![feature(splice)] -#![feature(str_checked_slicing)] #![feature(str_escape)] #![feature(test)] #![feature(unboxed_closures)] #![feature(unicode)] -#![feature(utf8_error_error_len)] extern crate alloc; extern crate test; diff --git a/src/libcore/char.rs b/src/libcore/char.rs index bb4cb0ac3b2..e8b81db0706 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -379,7 +379,7 @@ pub trait CharExt { fn escape_unicode(self) -> EscapeUnicode; #[stable(feature = "core", since = "1.6.0")] fn escape_default(self) -> EscapeDefault; - #[unstable(feature = "char_escape_debug", issue = "35068")] + #[stable(feature = "char_escape_debug", since = "1.20.0")] fn escape_debug(self) -> EscapeDebug; #[stable(feature = "core", since = "1.6.0")] fn len_utf8(self) -> usize; @@ -776,24 +776,24 @@ impl fmt::Display for EscapeDefault { /// /// [`escape_debug`]: ../../std/primitive.char.html#method.escape_debug /// [`char`]: ../../std/primitive.char.html -#[unstable(feature = "char_escape_debug", issue = "35068")] +#[stable(feature = "char_escape_debug", since = "1.20.0")] #[derive(Clone, Debug)] pub struct EscapeDebug(EscapeDefault); -#[unstable(feature = "char_escape_debug", issue = "35068")] +#[stable(feature = "char_escape_debug", since = "1.20.0")] impl Iterator for EscapeDebug { type Item = char; fn next(&mut self) -> Option { self.0.next() } fn size_hint(&self) -> (usize, Option) { self.0.size_hint() } } -#[unstable(feature = "char_escape_debug", issue = "35068")] +#[stable(feature = "char_escape_debug", since = "1.20.0")] impl ExactSizeIterator for EscapeDebug { } #[unstable(feature = "fused", issue = "35602")] impl FusedIterator for EscapeDebug {} -#[unstable(feature = "char_escape_debug", issue = "35068")] +#[stable(feature = "char_escape_debug", since = "1.20.0")] impl fmt::Display for EscapeDebug { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(&self.0, f) diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index ae74016ad74..2edf8e1fa88 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -574,7 +574,7 @@ mod builtin { /// For more information, see the [RFC]. /// /// [RFC]: https://github.com/rust-lang/rfcs/blob/master/text/1695-add-error-macro.md - #[unstable(feature = "compile_error_macro", issue = "40872")] + #[stable(feature = "compile_error_macro", since = "1.20.0")] #[macro_export] #[cfg(dox)] macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) } 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/libcore/option.rs b/src/libcore/option.rs index e825acad471..ef41b679410 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -671,8 +671,6 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(option_entry)] - /// /// let mut x = None; /// /// { @@ -685,7 +683,7 @@ impl Option { /// assert_eq!(x, Some(7)); /// ``` #[inline] - #[unstable(feature = "option_entry", issue = "39288")] + #[stable(feature = "option_entry", since = "1.20.0")] pub fn get_or_insert(&mut self, v: T) -> &mut T { match *self { None => *self = Some(v), @@ -706,8 +704,6 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(option_entry)] - /// /// let mut x = None; /// /// { @@ -720,7 +716,7 @@ impl Option { /// assert_eq!(x, Some(7)); /// ``` #[inline] - #[unstable(feature = "option_entry", issue = "39288")] + #[stable(feature = "option_entry", since = "1.20.0")] pub fn get_or_insert_with T>(&mut self, f: F) -> &mut T { match *self { None => *self = Some(f()), diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 95b27751a6a..4c99fe97daf 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -207,7 +207,7 @@ impl Utf8Error { /// that starts at the index given by `valid_up_to()`. /// Decoding should resume after that sequence /// (after inserting a U+FFFD REPLACEMENT CHARACTER) in case of lossy decoding. - #[unstable(feature = "utf8_error_error_len", reason ="new", issue = "40494")] + #[stable(feature = "utf8_error_error_len", since = "1.20.0")] pub fn error_len(&self) -> Option { self.error_len.map(|len| len as usize) } @@ -301,7 +301,7 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> { } /// Converts a mutable slice of bytes to a mutable string slice. -#[unstable(feature = "str_mut_extras", issue = "41119")] +#[stable(feature = "str_mut_extras", since = "1.20.0")] pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> { run_utf8_validation(v)?; Ok(unsafe { from_utf8_unchecked_mut(v) }) @@ -382,7 +382,7 @@ pub unsafe fn from_utf8_unchecked(v: &[u8]) -> &str { /// /// [fromutf8]: fn.from_utf8_unchecked.html #[inline] -#[unstable(feature = "str_mut_extras", issue = "41119")] +#[stable(feature = "str_mut_extras", since = "1.20.0")] pub unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str { mem::transmute(v) } @@ -1776,7 +1776,7 @@ mod traits { } } - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::RangeFull { type Output = str; #[inline] @@ -1805,7 +1805,7 @@ mod traits { } } - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::Range { type Output = str; #[inline] @@ -1859,7 +1859,7 @@ mod traits { } } - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::RangeTo { type Output = str; #[inline] @@ -1904,7 +1904,7 @@ mod traits { } } - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::RangeFrom { type Output = str; #[inline] @@ -1951,7 +1951,7 @@ mod traits { } } - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::RangeInclusive { type Output = str; #[inline] @@ -1994,7 +1994,7 @@ mod traits { - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] impl SliceIndex for ops::RangeToInclusive { type Output = str; #[inline] @@ -2094,13 +2094,13 @@ pub trait StrExt { #[rustc_deprecated(since = "1.6.0", reason = "use lines() instead now")] #[allow(deprecated)] fn lines_any(&self) -> LinesAny; - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] fn get>(&self, i: I) -> Option<&I::Output>; - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] fn get_mut>(&mut self, i: I) -> Option<&mut I::Output>; - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] unsafe fn get_unchecked>(&self, i: I) -> &I::Output; - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] unsafe fn get_unchecked_mut>(&mut self, i: I) -> &mut I::Output; #[stable(feature = "core", since = "1.6.0")] unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str; @@ -2123,7 +2123,7 @@ pub trait StrExt { fn is_char_boundary(&self, index: usize) -> bool; #[stable(feature = "core", since = "1.6.0")] fn as_bytes(&self) -> &[u8]; - #[unstable(feature = "str_mut_extras", issue = "41119")] + #[stable(feature = "str_mut_extras", since = "1.20.0")] unsafe fn as_bytes_mut(&mut self) -> &mut [u8]; #[stable(feature = "core", since = "1.6.0")] fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option; diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs index 26e4c21dc8f..a85c347146b 100644 --- a/src/libcore/tests/lib.rs +++ b/src/libcore/tests/lib.rs @@ -11,7 +11,6 @@ #![deny(warnings)] #![feature(box_syntax)] -#![feature(char_escape_debug)] #![feature(const_fn)] #![feature(core_float)] #![feature(core_private_bignum)] diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 0a74fb8dc86..bb27d479a41 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(unix, feature(libc))] #![cfg_attr(test, feature(test))] diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 5f0b11a616e..db64d41011c 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -453,8 +453,6 @@ impl CString { /// # Examples /// /// ``` - /// #![feature(as_c_str)] - /// /// use std::ffi::{CString, CStr}; /// /// let c_string = CString::new(b"foo".to_vec()).unwrap(); @@ -462,7 +460,7 @@ impl CString { /// assert_eq!(c_str, CStr::from_bytes_with_nul(b"foo\0").unwrap()); /// ``` #[inline] - #[unstable(feature = "as_c_str", issue = "40380")] + #[stable(feature = "as_c_str", since = "1.20.0")] pub fn as_c_str(&self) -> &CStr { &*self } @@ -474,15 +472,13 @@ impl CString { /// # Examples /// /// ``` - /// #![feature(into_boxed_c_str)] - /// /// use std::ffi::{CString, CStr}; /// /// let c_string = CString::new(b"foo".to_vec()).unwrap(); /// let boxed = c_string.into_boxed_c_str(); /// assert_eq!(&*boxed, CStr::from_bytes_with_nul(b"foo\0").unwrap()); /// ``` - #[unstable(feature = "into_boxed_c_str", issue = "40380")] + #[stable(feature = "into_boxed_c_str", since = "1.20.0")] pub fn into_boxed_c_str(self) -> Box { unsafe { mem::transmute(self.into_inner()) } } @@ -1001,15 +997,13 @@ impl CStr { /// # Examples /// /// ``` - /// #![feature(into_boxed_c_str)] - /// /// use std::ffi::CString; /// /// let c_string = CString::new(b"foo".to_vec()).unwrap(); /// let boxed = c_string.into_boxed_c_str(); /// assert_eq!(boxed.into_c_string(), CString::new("foo").unwrap()); /// ``` - #[unstable(feature = "into_boxed_c_str", issue = "40380")] + #[stable(feature = "into_boxed_c_str", since = "1.20.0")] pub fn into_c_string(self: Box) -> CString { unsafe { mem::transmute(self) } } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 02a13ed7a5a..d62e3e905e3 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -252,15 +252,13 @@ impl OsString { /// # Examples /// /// ``` - /// #![feature(into_boxed_os_str)] - /// /// use std::ffi::{OsString, OsStr}; /// /// let s = OsString::from("hello"); /// /// let b: Box = s.into_boxed_os_str(); /// ``` - #[unstable(feature = "into_boxed_os_str", issue = "40380")] + #[stable(feature = "into_boxed_os_str", since = "1.20.0")] pub fn into_boxed_os_str(self) -> Box { unsafe { mem::transmute(self.inner.into_box()) } } @@ -511,7 +509,7 @@ impl OsStr { /// /// [`Box`]: ../boxed/struct.Box.html /// [`OsString`]: struct.OsString.html - #[unstable(feature = "into_boxed_os_str", issue = "40380")] + #[stable(feature = "into_boxed_os_str", since = "1.20.0")] pub fn into_os_string(self: Box) -> OsString { let inner: Box = unsafe { mem::transmute(self) }; OsString { inner: Buf::from_box(inner) } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 7584d753240..bd9c9c74784 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -249,7 +249,6 @@ #![feature(cfg_target_has_atomic)] #![feature(cfg_target_thread_local)] #![feature(cfg_target_vendor)] -#![feature(char_escape_debug)] #![feature(char_error_internals)] #![feature(char_internals)] #![feature(collections_range)] @@ -304,7 +303,6 @@ #![feature(stmt_expr_attributes)] #![feature(str_char)] #![feature(str_internals)] -#![feature(str_mut_extras)] #![feature(str_utf16)] #![feature(test, rustc_private)] #![feature(thread_local)] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 6ad22820a7d..343c499b3ff 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -249,7 +249,7 @@ pub mod builtin { /// For more information, see the [RFC]. /// /// [RFC]: https://github.com/rust-lang/rfcs/blob/master/text/1695-add-error-macro.md - #[unstable(feature = "compile_error_macro", issue = "40872")] + #[stable(feature = "compile_error_macro", since = "1.20.0")] #[macro_export] macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) } diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 619d0795421..e083ab0ef97 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1327,7 +1327,7 @@ impl PathBuf { /// /// [`Box`]: ../../std/boxed/struct.Box.html /// [`Path`]: struct.Path.html - #[unstable(feature = "into_boxed_path", issue = "40380")] + #[stable(feature = "into_boxed_path", since = "1.20.0")] pub fn into_boxed_path(self) -> Box { unsafe { mem::transmute(self.inner.into_boxed_os_str()) } } @@ -2300,7 +2300,7 @@ impl Path { /// /// [`Box`]: ../../std/boxed/struct.Box.html /// [`PathBuf`]: struct.PathBuf.html - #[unstable(feature = "into_boxed_path", issue = "40380")] + #[stable(feature = "into_boxed_path", since = "1.20.0")] pub fn into_path_buf(self: Box) -> PathBuf { let inner: Box = unsafe { mem::transmute(self) }; PathBuf { inner: OsString::from(inner) } diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs index d6836418b4b..5cf05bff8c5 100644 --- a/src/libstd_unicode/char.rs +++ b/src/libstd_unicode/char.rs @@ -326,7 +326,6 @@ impl char { /// As an iterator: /// /// ``` - /// # #![feature(char_escape_debug)] /// for c in '\n'.escape_debug() { /// print!("{}", c); /// } @@ -336,7 +335,6 @@ impl char { /// Using `println!` directly: /// /// ``` - /// # #![feature(char_escape_debug)] /// println!("{}", '\n'.escape_debug()); /// ``` /// @@ -349,10 +347,9 @@ impl char { /// Using `to_string`: /// /// ``` - /// # #![feature(char_escape_debug)] /// assert_eq!('\n'.escape_debug().to_string(), "\\n"); /// ``` - #[unstable(feature = "char_escape_debug", issue = "35068")] + #[stable(feature = "char_escape_debug", since = "1.20.0")] #[inline] pub fn escape_debug(self) -> EscapeDebug { C::escape_debug(self) diff --git a/src/libstd_unicode/lib.rs b/src/libstd_unicode/lib.rs index 98624800b4c..698210e83f3 100644 --- a/src/libstd_unicode/lib.rs +++ b/src/libstd_unicode/lib.rs @@ -32,7 +32,6 @@ #![deny(warnings)] #![no_std] -#![feature(char_escape_debug)] #![feature(core_char_ext)] #![feature(str_internals)] #![feature(core_intrinsics)] diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index dc0848176d6..f6d56557166 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1041,7 +1041,6 @@ impl<'feat> ExpansionConfig<'feat> { fn enable_allow_internal_unstable = allow_internal_unstable, fn enable_custom_derive = custom_derive, fn proc_macro_enabled = proc_macro, - fn enable_compile_error = compile_error, } } diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 448f95c93a0..e8de8cf41c9 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -117,7 +117,6 @@ macro_rules! declare_features { declare_features! ( (active, asm, "1.0.0", Some(29722)), - (active, compile_error, "1.20.0", Some(40872)), (active, concat_idents, "1.0.0", Some(29599)), (active, link_args, "1.0.0", Some(29596)), (active, log_syntax, "1.0.0", Some(29598)), @@ -445,6 +444,8 @@ declare_features! ( // Allows the definition of associated constants in `trait` or `impl` // blocks. (accepted, associated_consts, "1.20.0", Some(29646)), + // Usage of the `compile_error!` macro + (accepted, compile_error, "1.20.0", Some(40872)), ); // If you change this, please modify src/doc/unstable-book as well. You must @@ -1040,9 +1041,6 @@ pub const EXPLAIN_LOG_SYNTAX: &'static str = pub const EXPLAIN_CONCAT_IDENTS: &'static str = "`concat_idents` is not stable enough for use and is subject to change"; -pub const EXPLAIN_COMPILE_ERROR: &'static str = - "`compile_error` is not stable enough for use and is subject to change"; - pub const EXPLAIN_TRACE_MACROS: &'static str = "`trace_macros` is not stable enough for use and is subject to change"; pub const EXPLAIN_ALLOW_INTERNAL_UNSTABLE: &'static str = diff --git a/src/libsyntax_ext/compile_error.rs b/src/libsyntax_ext/compile_error.rs index bb496716d8c..7bc7afba63c 100644 --- a/src/libsyntax_ext/compile_error.rs +++ b/src/libsyntax_ext/compile_error.rs @@ -12,7 +12,6 @@ use syntax::ext::base::*; use syntax::ext::base; -use syntax::feature_gate; use syntax_pos::Span; use syntax::tokenstream; @@ -20,15 +19,6 @@ pub fn expand_compile_error<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[tokenstream::TokenTree]) -> Box { - if !cx.ecfg.enable_compile_error() { - feature_gate::emit_feature_err(&cx.parse_sess, - "compile_error", - sp, - feature_gate::GateIssue::Language, - feature_gate::EXPLAIN_COMPILE_ERROR); - return DummyResult::expr(sp); - } - let var = match get_single_str_from_tts(cx, sp, tts, "compile_error!") { None => return DummyResult::expr(sp), Some(v) => v, diff --git a/src/test/compile-fail/compile_error_macro.rs b/src/test/compile-fail/compile_error_macro.rs index 2a2c3fd8092..e9c5993098c 100644 --- a/src/test/compile-fail/compile_error_macro.rs +++ b/src/test/compile-fail/compile_error_macro.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(compile_error)] - fn main() { compile_error!("a very descriptive error message"); //~ ERROR: a very descriptive error message } diff --git a/src/test/compile-fail/feature-gate-compile_error.rs b/src/test/compile-fail/feature-gate-compile_error.rs deleted file mode 100644 index 545c6852961..00000000000 --- a/src/test/compile-fail/feature-gate-compile_error.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - compile_error!("test"); //~ ERROR: `compile_error` is not stable enough -}