-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected end of macro invocation
when passing no parameters to debug macro.
#271
Comments
I think the situation is a bit different here compared to println as different log lines are more separate than standard output is. Why do you want to log no information? |
It's an easy way of printing a line break. |
This might be of more obvious value with #296, e.g. logging with structured values only, and no unstructured message? Also an obvious workaround with current log is Logging implementations could still decide, or be configured, to filter both |
Also the error message for an empty log macro invocation, is now even stranger than the OP's title, see below. I would imagine, if this should remain a compile time error, that a PR would be favorably considered to improve the error message: error: expected identifier, found `,`
--> src/main.rs:9:5
|
9 | info!();
| ^^^^^^^^
| |
| expected identifier
| help: remove this comma
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) |
…tte-5.2.0 Bump miette from 5.1.1 to 5.2.0
When I pass no parameters to
debug!()
, like so,the program will exit with the error
unexpected end of macro invocation
. The expected behavior is that an empty line should be printed, as it is withprintln!()
.The text was updated successfully, but these errors were encountered: