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
This message sometimes (but not always) appears at the bottom of output after a parse error. It seems unintentional and maybe like some accidental debug logging.
Build rustfmt from master branch (currently 6646248). Write { to openbrace.rs and } to closebrace.rs. Run rustfmt on each as shown above. failed to parse Real("...") appears for openbrace.rs, though not for closebrace.rs. It should be for neither.
Expected behavior
Just the compiler-style diagnostics would be sufficient. failed to parse Real("...") should not appear also at the end.
The text was updated successfully, but these errors were encountered:
Thanks for the report! There were indeed two bugs here:
A typo/issue in how we we were using thiserror on the parsing error variant which was causing the spurious failed to parse Real("...") instead of the expected failed to parse /home/caleb/dev/rustfmt-sandbox/....
An unhandled rustc parser panic that was only hit with certain types of input in the entry point file (closedbrace.rs in your example)
Just the compiler-style diagnostics would be sufficient. failed to parse Real("...") should not appear also at the end.
We actually do want to surface up the rustfmt operation error, including the parsing variants (just without the formatting bug). It's important because users can actually instruct rustfmt to disable the compiler diagnostics via certain config options, like hide_parser_errors, and we don't want to fail completely silently, and it's also useful for us in bug reports since there's a few different code branches that can have the compiler-style parser error emissions.
Describe the bug
This message sometimes (but not always) appears at the bottom of output after a parse error. It seems unintentional and maybe like some accidental debug logging.
To Reproduce
Build rustfmt from master branch (currently 6646248). Write
{
to openbrace.rs and}
to closebrace.rs. Run rustfmt on each as shown above.failed to parse Real("...")
appears for openbrace.rs, though not for closebrace.rs. It should be for neither.Expected behavior
Just the compiler-style diagnostics would be sufficient.
failed to parse Real("...")
should not appear also at the end.The text was updated successfully, but these errors were encountered: