Skip to content

Commit 835bbb3

Browse files
committed
feat(std): Stabilize 'os_str_bytes' feature
Closes rust-lang#111544
1 parent 98e8a62 commit 835bbb3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

std/src/ffi/os_str.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ impl OsString {
164164
/// # Example
165165
///
166166
/// ```
167-
/// #![feature(os_str_bytes)]
168-
///
169167
/// use std::ffi::OsStr;
170168
///
171169
/// let os_str = OsStr::new("Mary had a little lamb");
@@ -181,7 +179,7 @@ impl OsString {
181179
///
182180
/// [conversions]: super#conversions
183181
#[inline]
184-
#[unstable(feature = "os_str_bytes", issue = "111544")]
182+
#[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")]
185183
pub unsafe fn from_os_str_bytes_unchecked(bytes: Vec<u8>) -> Self {
186184
OsString { inner: Buf::from_os_str_bytes_unchecked(bytes) }
187185
}
@@ -219,7 +217,7 @@ impl OsString {
219217
///
220218
/// [`std::ffi`]: crate::ffi
221219
#[inline]
222-
#[unstable(feature = "os_str_bytes", issue = "111544")]
220+
#[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")]
223221
pub fn into_os_str_bytes(self) -> Vec<u8> {
224222
self.inner.into_os_str_bytes()
225223
}
@@ -755,8 +753,6 @@ impl OsStr {
755753
/// # Example
756754
///
757755
/// ```
758-
/// #![feature(os_str_bytes)]
759-
///
760756
/// use std::ffi::OsStr;
761757
///
762758
/// let os_str = OsStr::new("Mary had a little lamb");
@@ -772,7 +768,7 @@ impl OsStr {
772768
///
773769
/// [conversions]: super#conversions
774770
#[inline]
775-
#[unstable(feature = "os_str_bytes", issue = "111544")]
771+
#[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")]
776772
pub unsafe fn from_os_str_bytes_unchecked(bytes: &[u8]) -> &Self {
777773
Self::from_inner(Slice::from_os_str_bytes_unchecked(bytes))
778774
}
@@ -962,7 +958,7 @@ impl OsStr {
962958
///
963959
/// [`std::ffi`]: crate::ffi
964960
#[inline]
965-
#[unstable(feature = "os_str_bytes", issue = "111544")]
961+
#[stable(feature = "os_str_bytes", since = "CURRENT_RUSTC_VERSION")]
966962
pub fn as_os_str_bytes(&self) -> &[u8] {
967963
self.inner.as_os_str_bytes()
968964
}

0 commit comments

Comments
 (0)