Skip to content
Myr

Merge pull request #177 from dtolnay/format

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Refer to format macro by absolute path

authored by David Tolnay · committed by GitHub · parents 263257b, 95351e3 · Browse files · 2 files+19 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+19 added−3 removed

  • other:+19 added−3 removed

2 files+19 added−3 removed

modified:src/lib.rs+18 added-2 removed
231 unmodified lines
232)]233234mod alloc {235 #[cfg(not(feature = "std"))]236 extern crate alloc;236 pub extern crate alloc;237238 #[cfg(not(feature = "std"))]239 pub use alloc::boxed::Box;240
382 unmodified lines
623 pub use crate::kind::BoxedKind;624 }625626 #[cfg(anyhow_no_macro_reexport)]627 pub use crate::{__anyhow_concat as concat, __anyhow_stringify as stringify};627 pub use crate::{628 __anyhow_concat as concat, __anyhow_format as format, __anyhow_stringify as stringify,629 };630 #[cfg(not(anyhow_no_macro_reexport))]631 pub use core::{concat, stringify};632633 #[cfg(all(not(anyhow_no_macro_reexport), not(feature = "std")))]634 pub use crate::alloc::alloc::format;635 #[cfg(all(not(anyhow_no_macro_reexport), feature = "std"))]636 pub use std::format;637638 #[cfg(anyhow_no_macro_reexport)]639 #[doc(hidden)]640 #[macro_export]641 macro_rules! __anyhow_concat {
4 unmodified lines
646647 #[cfg(anyhow_no_macro_reexport)]648 #[doc(hidden)]649 #[macro_export]650 macro_rules! __anyhow_format {651 ($($tt:tt)*) => {652 format!($($tt)*)653 };654 }655656 #[cfg(anyhow_no_macro_reexport)]657 #[doc(hidden)]658 #[macro_export]659 macro_rules! __anyhow_stringify {660 ($($tt:tt)*) => {661 stringify!($($tt)*)662 };
2 unmodified lines
modified:src/macros.rs+1 added-1 removed
177 unmodified lines
178 error => (&error).anyhow_kind().new(error),179 }180 });181 ($fmt:expr, $($arg:tt)*) => {182 $crate::Error::msg(format!($fmt, $($arg)*))182 $crate::Error::msg($crate::private::format!($fmt, $($arg)*))183 };184}