Skip to content

Commit daa371d

Browse files
committed
Only define rustc_diagnostic_item format_macro in not(test).
1 parent 2a0c424 commit daa371d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ macro_rules! vec {
107107
/// ```
108108
#[macro_export]
109109
#[stable(feature = "rust1", since = "1.0.0")]
110-
#[rustc_diagnostic_item = "format_macro"]
110+
#[cfg_attr(not(test), rustc_diagnostic_item = "format_macro")]
111111
macro_rules! format {
112112
($($arg:tt)*) => {{
113113
let res = $crate::fmt::format($crate::__export::format_args!($($arg)*));

0 commit comments

Comments
 (0)