You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if one wants to print a number (or any other non-string value), one has to use println!("{}", 1234), which is a tad unwieldy. println!(1234) throws an error (one-argument invocations only work with strings). It's also annoying to write during debugging.
Why not overload the macros so that println!(expr) is an alias for println!("{}", expr)? This won't break any current behavior, but it will turn an error into something useful.
I have a possible fix on this branch, though eddyb suggested I try to make the changes in format_args! itself. (I'm not so familiar with that code, so I'd prefer to get feedback here before working on that.)