Skip to content

Commit d8f8adf

Browse files
committed
add example of joining with a absolute path
1 parent ec3da87 commit d8f8adf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@ impl Path {
25412541
/// use std::path::{Path, PathBuf};
25422542
///
25432543
/// assert_eq!(Path::new("/etc").join("passwd"), PathBuf::from("/etc/passwd"));
2544+
/// assert_eq!(Path::new("/etc").join("/bin/sh"), PathBuf::from("/bin/sh"));
25442545
/// ```
25452546
#[stable(feature = "rust1", since = "1.0.0")]
25462547
#[must_use]

0 commit comments

Comments
 (0)