diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-21 19:01:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-21 19:01:14 +0100 |
| commit | 2dc7573edd7a90a31baa2d751a53717702947d14 (patch) | |
| tree | 6563c600d433b9fa6ac54a80d4003f0c53f20f61 /library | |
| parent | 4aa973b3e43a810cc0f37a182da22feb80d73e81 (diff) | |
| parent | 5112ecb8ca844888c3e2363edc914e12afbaef77 (diff) | |
| download | rust-2dc7573edd7a90a31baa2d751a53717702947d14.tar.gz rust-2dc7573edd7a90a31baa2d751a53717702947d14.zip | |
Rollup merge of #137336 - riverbl:stabilise-os-str-display, r=tgross35
Stabilise `os_str_display` Closes #120048.
Diffstat (limited to 'library')
| -rw-r--r-- | library/std/src/ffi/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/library/std/src/ffi/mod.rs b/library/std/src/ffi/mod.rs index 7d7cce09a3f..860ec3a6be1 100644 --- a/library/std/src/ffi/mod.rs +++ b/library/std/src/ffi/mod.rs @@ -201,5 +201,5 @@ pub use self::c_str::{CStr, CString}; #[doc(inline)] pub use self::os_str::{OsStr, OsString}; -#[unstable(feature = "os_str_display", issue = "120048")] +#[stable(feature = "os_str_display", since = "CURRENT_RUSTC_VERSION")] pub mod os_str; diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index c4c8dbccd7a..f4a02802336 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -1204,13 +1204,12 @@ impl OsStr { /// # Examples /// /// ``` - /// #![feature(os_str_display)] /// use std::ffi::OsStr; /// /// let s = OsStr::new("Hello, world!"); /// println!("{}", s.display()); /// ``` - #[unstable(feature = "os_str_display", issue = "120048")] + #[stable(feature = "os_str_display", since = "CURRENT_RUSTC_VERSION")] #[must_use = "this does not display the `OsStr`; \ it returns an object that can be displayed"] #[inline] @@ -1559,7 +1558,6 @@ impl fmt::Debug for OsStr { /// # Examples /// /// ``` -/// #![feature(os_str_display)] /// use std::ffi::OsStr; /// /// let s = OsStr::new("Hello, world!"); @@ -1568,19 +1566,19 @@ impl fmt::Debug for OsStr { /// /// [`Display`]: fmt::Display /// [`format!`]: crate::format -#[unstable(feature = "os_str_display", issue = "120048")] +#[stable(feature = "os_str_display", since = "CURRENT_RUSTC_VERSION")] pub struct Display<'a> { os_str: &'a OsStr, } -#[unstable(feature = "os_str_display", issue = "120048")] +#[stable(feature = "os_str_display", since = "CURRENT_RUSTC_VERSION")] impl fmt::Debug for Display<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(&self.os_str, f) } } -#[unstable(feature = "os_str_display", issue = "120048")] +#[stable(feature = "os_str_display", since = "CURRENT_RUSTC_VERSION")] impl fmt::Display for Display<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(&self.os_str.inner, f) |
