Skip to content

Commit 4bf9cae

Browse files
authored
Rollup merge of #106280 - Ezrashaw:path-join-docs-better, r=thomcc
docs: add link to `Path::join` in `PathBuf::push` Fixes #106219 Hopefully my wording is alright.
2 parents dd01a16 + 2c4ecff commit 4bf9cae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/path.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,9 @@ impl PathBuf {
12461246
/// and `path` is not empty, the new path is normalized: all references
12471247
/// to `.` and `..` are removed.
12481248
///
1249+
/// Consider using [`Path::join`] if you need a new `PathBuf` instead of
1250+
/// using this function on a cloned `PathBuf`.
1251+
///
12491252
/// # Examples
12501253
///
12511254
/// Pushing a relative path extends the existing path:

0 commit comments

Comments
 (0)