We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4cbb44 commit d0c1405Copy full SHA for d0c1405
library/std/src/macros.rs
@@ -282,6 +282,10 @@ macro_rules! eprintln {
282
#[macro_export]
283
#[stable(feature = "dbg_macro", since = "1.32.0")]
284
macro_rules! dbg {
285
+ // NOTE: We cannot use `concat!` to make a static string as a format argument
286
+ // of `eprintln!` because `file!` could contain a `{` or
287
+ // `$val` expression could be a block (`{ .. }`), in which case the `eprintln!`
288
+ // will be malformed.
289
() => {
290
$crate::eprintln!("[{}:{}]", $crate::file!(), $crate::line!());
291
};
0 commit comments