regression: rustfmt using input from stdin emits empty output when using #![rustfmt::skip]
#5368
Labels
bug
Panic, non-idempotency, invalid code, etc.
Since #5094 - rustfmt now emits nothing to stdout if reading a file with
#![rustfmt::skip]
is provided via stdin.For example, running
echo '#![rustfmt::skip]\n\nfn main() { }' | rustfmt
no longer emits anything to stdout.Rust-analyzer uses rustfmt to format files, and sends rustfmt the file contents to format via stdin.
This has caused an interesting issue, where rustfmt emits nothing, so rust-analyzer deletes the contents of the file being formatted: rust-lang/rust-analyzer#12458
The text was updated successfully, but these errors were encountered: