From eba3a6106728e131286e3751459fccd7594102ef Mon Sep 17 00:00:00 2001 From: schvv31n Date: Tue, 4 Mar 2025 21:29:45 +0000 Subject: [PATCH] Stabilised `os_string_pathbuf_leak` --- library/std/src/ffi/os_str.rs | 2 +- library/std/src/path.rs | 2 +- library/std/tests/path.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 21d5b7292e819..3cc225004ea39 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -568,7 +568,7 @@ impl OsString { /// However, keep in mind that trimming the capacity may result in a reallocation and copy. /// /// [`into_boxed_os_str`]: Self::into_boxed_os_str - #[unstable(feature = "os_string_pathbuf_leak", issue = "125965")] + #[stable(feature = "os_string_pathbuf_leak", since = "CURRENT_RUSTC_VERSION")] #[inline] pub fn leak<'a>(self) -> &'a mut OsStr { OsStr::from_inner_mut(self.inner.leak()) diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 014b56d28f443..826d9f0f39dc6 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -1252,7 +1252,7 @@ impl PathBuf { /// However, keep in mind that trimming the capacity may result in a reallocation and copy. /// /// [`into_boxed_path`]: Self::into_boxed_path - #[unstable(feature = "os_string_pathbuf_leak", issue = "125965")] + #[stable(feature = "os_string_pathbuf_leak", since = "CURRENT_RUSTC_VERSION")] #[inline] pub fn leak<'a>(self) -> &'a mut Path { Path::from_inner_mut(self.inner.leak()) diff --git a/library/std/tests/path.rs b/library/std/tests/path.rs index 781855a2d14aa..be0dda1d426f3 100644 --- a/library/std/tests/path.rs +++ b/library/std/tests/path.rs @@ -3,7 +3,6 @@ path_add_extension, path_file_prefix, maybe_uninit_slice, - os_string_pathbuf_leak, normalize_lexically )]