rustfmt: rustfmt panics on Windows
rustfmt 0.8.3 works fine but when I run rustfmt 0.8.4, I get the following
cargo fmt
thread 'main' panicked at 'failed to emit error: operation not supported by the terminal', C:\Users\epage\.cargo\registry\src\github.com-1ecc6299db9ec823\syntex_errors-0.58.1\src\emitter.rs:1043
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: BaseThreadInitThunk
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 15 (8 by maintainers)
@nrc Doing some more testing on Windows nightly.
TLDR;
libsyntaxbranch appears to fix the problem, and my problems from two days ago seem to have been fixed by updating the nightly compiler.Testing Setup
Master Branch @ 15323fc38b8deb761594daba97ba09728ac6a48e
Invalid Rust code panics
rustfmt:Input
Output
libsyntaxBranchInput
Output
Success!
Input
Output
Works correctly, other than some
?characters displayed on the ends of lines in terminal (characters thatcmd.exedoesn’t support?Same for me. When i configure a task that calls “cargo fmt” in Visual Studio Code, i get this in the output pane:
With 2 source files.
When the file src/core/mod.rs is renamed to src/core.rs no error occures.