From 659c17a6760ca03d3d69e2f44cef8fb3932cec95 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Fri, 23 Jun 2023 14:38:30 +0200 Subject: [PATCH 1/2] Change the wording in `std::fmt::Write::write_str` Refer to the error instead of expanding its name. --- library/core/src/fmt/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 1786b309c5bd3..5c6359a9025e3 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -112,9 +112,9 @@ pub trait Write { /// /// # Errors /// - /// This function will return an instance of [`Error`] on error. + /// This function will return an instance of [`std::fmt::Error`] on error. /// - /// The purpose of std::fmt::Error is to abort the formatting operation when the underlying + /// The purpose of that 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. /// From e2f70324089a2eb75d52552c058170e37d0064f0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 27 Sep 2023 22:55:34 -0700 Subject: [PATCH 2/2] Fix "unresolved link to std::fmt::Error" error: unresolved link to `std::fmt::Error` --> library/core/src/fmt/mod.rs:115:52 | 115 | /// This function will return an instance of [`std::fmt::Error`] on error. | | = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings` --- library/core/src/fmt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 5c6359a9025e3..d99d9dea87cf7 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -112,7 +112,7 @@ pub trait Write { /// /// # Errors /// - /// This function will return an instance of [`std::fmt::Error`] on error. + /// This function will return an instance of [`std::fmt::Error`][Error] on error. /// /// The purpose of that error is to abort the formatting operation when the underlying /// destination encounters some error preventing it from accepting more text; it should