From 900f0189889133f1d76365dc961023f85e4b3a19 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 6 Jul 2023 17:14:10 -0700 Subject: [PATCH 1/2] Revert "Avoid calling a nonstandard write! macro that might be in scope" This reverts commit 264b7d19360332bd2cf8289a54619c3360a2f8fe. --- impl/src/attr.rs | 2 +- src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/impl/src/attr.rs b/impl/src/attr.rs index 0cb8c6f..9af7c60 100644 --- a/impl/src/attr.rs +++ b/impl/src/attr.rs @@ -197,7 +197,7 @@ impl ToTokens for Display<'_> { let fmt = &self.fmt; let args = &self.args; tokens.extend(quote! { - thiserror::__private::write!(__formatter, #fmt #args) + write!(__formatter, #fmt #args) }); } } diff --git a/src/lib.rs b/src/lib.rs index e6b2b4a..928eddd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -252,6 +252,4 @@ pub mod __private { pub use crate::display::{DisplayAsDisplay, PathAsDisplay}; #[cfg(provide_any)] pub use crate::provide::ThiserrorProvide; - - pub use std::write; } From cab9fec03e0f734ab7d42aa5de34024d0df761cd Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 6 Jul 2023 17:14:47 -0700 Subject: [PATCH 2/2] Avoid calling a nonstandard write! macro that might be in scope --- impl/src/attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/src/attr.rs b/impl/src/attr.rs index 9af7c60..aa71665 100644 --- a/impl/src/attr.rs +++ b/impl/src/attr.rs @@ -197,7 +197,7 @@ impl ToTokens for Display<'_> { let fmt = &self.fmt; let args = &self.args; tokens.extend(quote! { - write!(__formatter, #fmt #args) + std::write!(__formatter, #fmt #args) }); } }