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.
This commit is contained in:
Matthias Krüger 2022-12-31 23:51:34 +01:00 committed by GitHub
commit 4bf9cae080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: