about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSoroush Mirzaei <soroush.mirzaei@shopify.com>2025-09-07 11:14:00 -0400
committerSoroush Mirzaei <soroush.mirzaei@shopify.com>2025-09-07 11:17:59 -0400
commit4b5d0e02ca2647bf1efb2ecd3303c21ead64d2ea (patch)
tree74b7121f9a134027eb4bd19fda5ec9e59fc11e09
parentf13ef0d75d834c826c9479a5d244bcfb9891df45 (diff)
downloadrust-4b5d0e02ca2647bf1efb2ecd3303c21ead64d2ea.tar.gz
rust-4b5d0e02ca2647bf1efb2ecd3303c21ead64d2ea.zip
docs(std): add error docs for path canonicalize
-rw-r--r--library/std/src/path.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 19663e4a9df..70ba502d684 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -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