Merge pull request #242 from dtolnay/stdwrite

Fix access to `write!` macro when `thiserror` is not in scope
This commit is contained in:
David Tolnay 2023-07-06 17:17:39 -07:00 committed by GitHub
commit f6dc5e54e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -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)
std::write!(__formatter, #fmt #args)
});
}
}

View File

@ -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;
}