From 9aee1de612e55f03b24ab292e6c00c3b896b8493 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 1 Sep 2023 11:13:45 -0500 Subject: [PATCH] feat(std): Stabilize 'os_str_bytes' feature Closes #111544 --- library/std/src/ffi/os_str.rs | 12 ++++-------- src/tools/miri/src/lib.rs | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 43cecb19b148e..a09d5cf3cbf7e 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -164,8 +164,6 @@ impl OsString { /// # Example /// /// ``` - /// #![feature(os_str_bytes)] - /// /// use std::ffi::OsStr; /// /// let os_str = OsStr::new("Mary had a little lamb"); @@ -181,7 +179,7 @@ impl OsString { /// /// [conversions]: super#conversions #[inline] - #[unstable(feature = "os_str_bytes", issue = "111544")] + #[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn from_os_str_bytes_unchecked(bytes: Vec) -> Self { OsString { inner: Buf::from_os_str_bytes_unchecked(bytes) } } @@ -219,7 +217,7 @@ impl OsString { /// /// [`std::ffi`]: crate::ffi #[inline] - #[unstable(feature = "os_str_bytes", issue = "111544")] + #[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")] pub fn into_os_str_bytes(self) -> Vec { self.inner.into_os_str_bytes() } @@ -755,8 +753,6 @@ impl OsStr { /// # Example /// /// ``` - /// #![feature(os_str_bytes)] - /// /// use std::ffi::OsStr; /// /// let os_str = OsStr::new("Mary had a little lamb"); @@ -772,7 +768,7 @@ impl OsStr { /// /// [conversions]: super#conversions #[inline] - #[unstable(feature = "os_str_bytes", issue = "111544")] + #[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn from_os_str_bytes_unchecked(bytes: &[u8]) -> &Self { Self::from_inner(Slice::from_os_str_bytes_unchecked(bytes)) } @@ -962,7 +958,7 @@ impl OsStr { /// /// [`std::ffi`]: crate::ffi #[inline] - #[unstable(feature = "os_str_bytes", issue = "111544")] + #[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")] pub fn as_os_str_bytes(&self) -> &[u8] { self.inner.as_os_str_bytes() } diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index 03dd9037808c6..816055cc4fe91 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -8,7 +8,6 @@ #![feature(yeet_expr)] #![feature(nonzero_ops)] #![feature(round_ties_even)] -#![feature(os_str_bytes)] #![feature(lint_reasons)] #![feature(trait_upcasting)] // Configure clippy and other lints