Dbg!(): to optionally allow formatting


That said, never before has a (stable) stdlib macro treated it’s input as anything other than a list of function arguments, except for stringify!.

I’m strongly against the tuple sugar, as I see no reason for tuples to receive special treatment here when they don’t receive it anywhere else.


In general, rustfmt and Rust’s standard style encourages writing multi-line function invocations with a comma after each argument, including the last. rustfmt can’t always insert or remove trailing commas in macros, because it doesn’t know whether the macro will treat commas as significant, but I think making the trailing comma significant is a bad idea. If you want to invoke dbg! on a 1-tuple, I think that should be spelled dbg!((x,)).


Also, I find it confusing that

dbg!{ a, }

returns a tuple.