1
Fork 0

Rollup merge of #105962 - zertosh:stabilize_path_as_mut_os_str, r=dtolnay

Stabilize path_as_mut_os_str

Closes #105021

r? ```@dtolnay```
This commit is contained in:
Matthias Krüger 2023-03-10 21:15:43 +01:00 committed by GitHub
commit a69a9b3038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1498,7 +1498,6 @@ impl PathBuf {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// #![feature(path_as_mut_os_str)]
/// use std::path::{Path, PathBuf}; /// use std::path::{Path, PathBuf};
/// ///
/// let mut path = PathBuf::from("/foo"); /// let mut path = PathBuf::from("/foo");
@ -1510,7 +1509,7 @@ impl PathBuf {
/// path.as_mut_os_string().push("baz"); /// path.as_mut_os_string().push("baz");
/// assert_eq!(path, Path::new("/foo/barbaz")); /// assert_eq!(path, Path::new("/foo/barbaz"));
/// ``` /// ```
#[unstable(feature = "path_as_mut_os_str", issue = "105021")] #[stable(feature = "path_as_mut_os_str", since = "CURRENT_RUSTC_VERSION")]
#[must_use] #[must_use]
#[inline] #[inline]
pub fn as_mut_os_string(&mut self) -> &mut OsString { pub fn as_mut_os_string(&mut self) -> &mut OsString {
@ -2066,7 +2065,6 @@ impl Path {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// #![feature(path_as_mut_os_str)]
/// use std::path::{Path, PathBuf}; /// use std::path::{Path, PathBuf};
/// ///
/// let mut path = PathBuf::from("Foo.TXT"); /// let mut path = PathBuf::from("Foo.TXT");
@ -2076,7 +2074,7 @@ impl Path {
/// path.as_mut_os_str().make_ascii_lowercase(); /// path.as_mut_os_str().make_ascii_lowercase();
/// assert_eq!(path, Path::new("foo.txt")); /// assert_eq!(path, Path::new("foo.txt"));
/// ``` /// ```
#[unstable(feature = "path_as_mut_os_str", issue = "105021")] #[stable(feature = "path_as_mut_os_str", since = "CURRENT_RUSTC_VERSION")]
#[must_use] #[must_use]
#[inline] #[inline]
pub fn as_mut_os_str(&mut self) -> &mut OsStr { pub fn as_mut_os_str(&mut self) -> &mut OsStr {