Skip to content

Commit

Permalink
Only define rustc_diagnostic_item format_macro in not(test).
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Feb 14, 2021
1 parent 2a0c424 commit daa371d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ macro_rules! vec {
/// ```
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_diagnostic_item = "format_macro"]
#[cfg_attr(not(test), rustc_diagnostic_item = "format_macro")]
macro_rules! format {
($($arg:tt)*) => {{
let res = $crate::fmt::format($crate::__export::format_args!($($arg)*));
Expand Down

0 comments on commit daa371d

Please sign in to comment.