about summary refs log tree commit diff
path: root/library/std/src/io/error.rs
diff options
context:
space:
mode:
authorJiahao XU <Jiahao_XU@outlook.com>2024-04-15 21:58:36 +1000
committerGitHub <noreply@github.com>2024-04-15 21:58:36 +1000
commit05366ee2707b1f594edf06de3b0e7edb16f0aa94 (patch)
treedf37d9dfad778fbc64dd0acf696912ea52ea0ab7 /library/std/src/io/error.rs
parent4a6b1562b5541af7402f7a372b0ad6ee37203a25 (diff)
downloadrust-05366ee2707b1f594edf06de3b0e7edb16f0aa94.tar.gz
rust-05366ee2707b1f594edf06de3b0e7edb16f0aa94.zip
Update doc for std::io::Error::downcast
Diffstat (limited to 'library/std/src/io/error.rs')
-rw-r--r--library/std/src/io/error.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index 8bd11911fb1..21ae7b91207 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -854,13 +854,17 @@ impl Error {
 
     /// Attempt to downcast the custom boxed error to `E`.
     ///
-    /// If this [`Error`] when this contains a custom boxed error,
+    /// If this [`Error`] contains a custom boxed error,
     /// then it would attempt downcasting on the boxed error,
     /// otherwise it will return [`Err`].
     ///
     /// If the custom boxed error has the same type as `E`, it will return [`Ok`],
     /// otherwise it will also return [`Err`].
     ///
+    /// This method is meant to be a convenience routine for calling
+    /// `Box<dyn Error + Sync + Send>::downcast` on the custom boxed error, returned by
+    /// [`Error::into_inner`].
+    ///
     ///
     /// # Examples
     ///