about summary refs log tree commit diff
diff options
context:
space:
mode:
authorValdemar Erk <valdemar@erk.dev>2023-01-20 12:03:43 +0100
committerValdemar Erk <valdemar@erk.dev>2023-01-20 12:03:43 +0100
commitd8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82 (patch)
treef535e2be2a1ededd0482ba7585112ff7ebc8584e
parentec3da87582a318ddb35d451bdba6d50591ea55ce (diff)
downloadrust-d8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82.tar.gz
rust-d8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82.zip
add example of joining with a absolute path
-rw-r--r--library/std/src/path.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 500a09ad08a..2f53cf83936 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2541,6 +2541,7 @@ impl Path {
     /// use std::path::{Path, PathBuf};
     ///
     /// assert_eq!(Path::new("/etc").join("passwd"), PathBuf::from("/etc/passwd"));
+    /// assert_eq!(Path::new("/etc").join("/bin/sh"), PathBuf::from("/bin/sh"));
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[must_use]