-
Notifications
You must be signed in to change notification settings - Fork 888
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
Formatting @generated from stdin results in empty output #5172
Comments
Just to clarify, are you seeing this strictly with stdin or both stdin and files? I can reproduce the former, but not the latter |
Strictly with stdin. IIUC the files he refers to are files manipulated by rust-analyzer. |
Indeed. Rust-analyzer writes the file to rustfmt's stdin as most of the time the changes made by the user haven't been saved yet. |
Thanks for clarifying. Will get the resolution for this pulled in after work today, and it'll get pulled into a 1.58.1 patch release that fortunately was already being considered/planned |
…es, r=Mark-Simulacrum resolve rustfmt issue with generated files Discussed in https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E58.20patch.20release refs rust-lang/rustfmt#5080 (comment) and rust-lang/rustfmt#5172 updating in-tree vs. subtree sync to make backporting easier, would like to nominate backporting to both beta/1.59 as well as the 1.58.1 patch release
Going to close as there's nothing left to do now but wait for the releases to go out, thanks again for the reports! |
This causes rust-analyzer to discard the entire file if you try to format it. See rust-lang/rust-analyzer#11285.
The text was updated successfully, but these errors were encountered: