about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEzra Shaw <ezrasure@outlook.com>2022-12-30 14:24:12 +1300
committerEzra Shaw <ezrasure@outlook.com>2022-12-30 14:24:12 +1300
commit2c4ecffb7758b93c6471efc0f1880b57577f6f5d (patch)
treefe98c55e1db550b9d6e3c037d47fce81ec09102c
parent270c94e484e19764a2832ef918c95224eb3f17c7 (diff)
downloadrust-2c4ecffb7758b93c6471efc0f1880b57577f6f5d.tar.gz
rust-2c4ecffb7758b93c6471efc0f1880b57577f6f5d.zip
docs: add link to `Path::join` in `PathBuf::push`
-rw-r--r--library/std/src/path.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 73b5056e932..999f5d3a93f 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -1246,6 +1246,9 @@ impl PathBuf {
     ///   and `path` is not empty, the new path is normalized: all references
     ///   to `.` and `..` are removed.
     ///
+    /// Consider using [`Path::join`] if you need a new `PathBuf` instead of
+    /// using this function on a cloned `PathBuf`.
+    ///
     /// # Examples
     ///
     /// Pushing a relative path extends the existing path: