Avoid calling a nonstandard write! macro that might be in scope

This commit is contained in:
David Tolnay 2023-07-06 15:00:49 -07:00
parent 43f3a2a661
commit 264b7d1936
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,7 @@ impl ToTokens for Display<'_> {
let fmt = &self.fmt;
let args = &self.args;
tokens.extend(quote! {
write!(__formatter, #fmt #args)
thiserror::__private::write!(__formatter, #fmt #args)
});
}
}

View File

@ -252,4 +252,6 @@ pub mod __private {
pub use crate::display::{DisplayAsDisplay, PathAsDisplay};
#[cfg(provide_any)]
pub use crate::provide::ThiserrorProvide;
pub use std::write;
}