Skip to content

Commit

Permalink
Rollup merge of rust-lang#105962 - zertosh:stabilize_path_as_mut_os_s…
Browse files Browse the repository at this point in the history
…tr, r=dtolnay

Stabilize path_as_mut_os_str

Closes rust-lang#105021

r? ``@dtolnay``
  • Loading branch information
matthiaskrgr authored Mar 10, 2023
2 parents e76678e + 5b7ab80 commit b4ebfeb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,6 @@ impl PathBuf {
/// # Examples
///
/// ```
/// #![feature(path_as_mut_os_str)]
/// use std::path::{Path, PathBuf};
///
/// let mut path = PathBuf::from("/foo");
Expand All @@ -1510,7 +1509,7 @@ impl PathBuf {
/// path.as_mut_os_string().push("baz");
/// 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]
#[inline]
pub fn as_mut_os_string(&mut self) -> &mut OsString {
Expand Down Expand Up @@ -2066,7 +2065,6 @@ impl Path {
/// # Examples
///
/// ```
/// #![feature(path_as_mut_os_str)]
/// use std::path::{Path, PathBuf};
///
/// let mut path = PathBuf::from("Foo.TXT");
Expand All @@ -2076,7 +2074,7 @@ impl Path {
/// path.as_mut_os_str().make_ascii_lowercase();
/// 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]
#[inline]
pub fn as_mut_os_str(&mut self) -> &mut OsStr {
Expand Down

0 comments on commit b4ebfeb

Please sign in to comment.