about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJiahao XU <Jiahao_XU@outlook.com>2022-07-15 13:04:06 +1000
committerGitHub <noreply@github.com>2022-07-15 13:04:06 +1000
commitd8aba1002a222d2a826c6c35fbb03dd4c1594a05 (patch)
tree638b9c6b834e034396948d635e87b3909b646c91
parent111253c519adc17f5bbfa41b7368512ac7e1effd (diff)
downloadrust-d8aba1002a222d2a826c6c35fbb03dd4c1594a05.tar.gz
rust-d8aba1002a222d2a826c6c35fbb03dd4c1594a05.zip
Improve example of `downcast`
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
-rw-r--r--library/std/src/io/error.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs
index 8f2119425d1..811688175e0 100644
--- a/library/std/src/io/error.rs
+++ b/library/std/src/io/error.rs
@@ -821,9 +821,10 @@ impl Error {
     /// }
     ///
     /// impl fmt::Display for E {
-    ///     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-    ///         todo!()
-    ///     }
+    ///    // ...
+    /// #    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+    /// #        todo!()
+    /// #    }
     /// }
     /// impl Error for E {}
     ///