about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDan Vail <danielhvail@live.com>2022-08-09 12:57:19 -0500
committerDan Vail <danielhvail@live.com>2022-08-09 12:57:19 -0500
commitee8a01f596d7d5aeeb817565492e5534e3bd4737 (patch)
tree41df0064ebb9d0b7dcd2839f92e9d7a381f4339c
parent0436067210cb12d08cfe0e3c06a18bbd4ee768d0 (diff)
downloadrust-ee8a01f596d7d5aeeb817565492e5534e3bd4737.tar.gz
rust-ee8a01f596d7d5aeeb817565492e5534e3bd4737.zip
Switching documentation to be more clear about potential errors
-rw-r--r--library/core/src/fmt/mod.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs
index 80f37cb5fdb..7ec565edb34 100644
--- a/library/core/src/fmt/mod.rs
+++ b/library/core/src/fmt/mod.rs
@@ -119,12 +119,9 @@ pub trait Write {
     ///
     /// This function will return an instance of [`Error`] on error.
     ///
-    /// Though it is possible for implementors of this trait to return an error, at the time
-    /// of writing these docs, no implementation of [`std::fmt::Write`] in the standard library
-    /// returns such an error.
-    ///
-    /// When working with external crates, it is advised to check the implementation of this
-    /// trait and anticipate any possible [`Error`]s.
+    /// The purpose of std::fmt::Error is to abort the formatting operation when the underlying
+    /// destination encounters some error preventing it from accepting more text; it should
+    /// generally be propagated rather than handled, at least when implementing formatting traits.
     ///
     /// # Examples
     ///