-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
Description
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.
$ target/release/rustfmt src/openbrace.rs
error: this file contains an unclosed delimiter
--> /git/rustfmt/src/openbrace.rs:1:3
|
1 | {
| - ^
| |
| unclosed delimiter
error: expected item, found `{`
--> /git/rustfmt/src/openbrace.rs:1:1
|
1 | {
| ^ expected item
failed to parse Real("/git/rustfmt/src/openbrace.rs")
$ target/release/rustfmt src/closebrace.rs
error: unexpected closing delimiter: `}`
--> /git/rustfmt/src/closebrace.rs:1:1
|
1 | }
| ^ unexpected closing delimiter
$ ▎
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.