Skip to content

Commit 3af45ee

Browse files
authored
Rollup merge of rust-lang#105801 - zertosh:path_mut_os_str_doc_test, r=dtolnay
Realistic `Path::as_mut_os_str` doctest With "Implement DerefMut for PathBuf" (rust-lang#105018) now merged, it's possible to exercise `Path::as_mut_os_str` (rust-lang#105002) without going through `into_boxed_path`.
2 parents 7ab8038 + c68d2e4 commit 3af45ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/path.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2039,12 +2039,12 @@ impl Path {
20392039
/// #![feature(path_as_mut_os_str)]
20402040
/// use std::path::{Path, PathBuf};
20412041
///
2042-
/// let mut path = PathBuf::from("/Foo.TXT").into_boxed_path();
2042+
/// let mut path = PathBuf::from("Foo.TXT");
20432043
///
2044-
/// assert_ne!(&*path, Path::new("/foo.txt"));
2044+
/// assert_ne!(path, Path::new("foo.txt"));
20452045
///
20462046
/// path.as_mut_os_str().make_ascii_lowercase();
2047-
/// assert_eq!(&*path, Path::new("/foo.txt"));
2047+
/// assert_eq!(path, Path::new("foo.txt"));
20482048
/// ```
20492049
#[unstable(feature = "path_as_mut_os_str", issue = "105021")]
20502050
#[must_use]

0 commit comments

Comments
 (0)