docs(std): add error docs for path canonicalize

This commit is contained in:
Soroush Mirzaei 2025-09-07 11:14:00 -04:00
parent f13ef0d75d
commit 4b5d0e02ca
No known key found for this signature in database
GPG key ID: A92CE25C0B02FB4E

View file

@ -3037,6 +3037,14 @@ impl Path {
///
/// This is an alias to [`fs::canonicalize`].
///
/// # Errors
///
/// This method will return an error in the following situations, but is not
/// limited to just these cases:
///
/// * `path` does not exist.
/// * A non-final component in path is not a directory.
///
/// # Examples
///
/// ```no_run