diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-19 20:54:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-19 20:54:57 +0100 |
| commit | 3af45eeb9898f8997339e51c1b9919eaaa040c0d (patch) | |
| tree | 2a621f55be1ed4a627d26550756bd4ab504d997b | |
| parent | 7ab803891dd95a04f3b2143e40b26f03b608b4bc (diff) | |
| parent | c68d2e4b879abc32d3fca6179d344d08dc1c73f6 (diff) | |
| download | rust-3af45eeb9898f8997339e51c1b9919eaaa040c0d.tar.gz rust-3af45eeb9898f8997339e51c1b9919eaaa040c0d.zip | |
Rollup merge of #105801 - zertosh:path_mut_os_str_doc_test, r=dtolnay
Realistic `Path::as_mut_os_str` doctest With "Implement DerefMut for PathBuf" (#105018) now merged, it's possible to exercise `Path::as_mut_os_str` (#105002) without going through `into_boxed_path`.
| -rw-r--r-- | library/std/src/path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs index a835b855ddd..73b5056e932 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2039,12 +2039,12 @@ impl Path { /// #![feature(path_as_mut_os_str)] /// use std::path::{Path, PathBuf}; /// - /// let mut path = PathBuf::from("/Foo.TXT").into_boxed_path(); + /// let mut path = PathBuf::from("Foo.TXT"); /// - /// assert_ne!(&*path, Path::new("/foo.txt")); + /// assert_ne!(path, Path::new("foo.txt")); /// /// 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")] #[must_use] |
