Rollup merge of #96586 - ear7h:master, r=joshtriplett

Add aliases for std::fs::canonicalize

The aliases are `realpath` and `GetFinalPathNameByHandle` which are explicitly mentioned in `canonicalize`'s documentation.
This commit is contained in:
Matthias Krüger 2022-05-07 22:44:37 +02:00 committed by GitHub
commit eecc0469f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1930,6 +1930,8 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
/// Ok(())
/// }
/// ```
#[doc(alias = "realpath")]
#[doc(alias = "GetFinalPathNameByHandle")]
#[stable(feature = "fs_canonicalize", since = "1.5.0")]
pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
fs_imp::canonicalize(path.as_ref())