Skip to content
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

Fix --check -l with stdin. #3910

Merged
merged 2 commits into from
Nov 12, 2019
Merged

Conversation

jugglerchris
Copy link
Contributor

This would also fix a panic with stdin on line ending differences, but these aren't detected as the saved source is kept with unix line endings so compares equal to the output.

One case which doesn't work is when there are only line ending fixes;
with stdin rustfmt is unable to detect the difference as it stores
the input with Unix line endings.
@jugglerchris
Copy link
Contributor Author

This is related to #3871 .

@calebcartwright
Copy link
Member

I think this is the last piece for #3871, so we should be able to close that issue once this is merged

@topecongiro topecongiro merged commit fb5fea6 into rust-lang:master Nov 12, 2019
karyon pushed a commit to karyon/rustfmt that referenced this pull request Oct 28, 2021
* Fix some possible panics when using `--check` with stdin.

One case which doesn't work is when there are only line ending fixes;
with stdin rustfmt is unable to detect the difference as it stores
the input with Unix line endings.

* Add test for `rustfmt --check -l` with stdin.
calebcartwright pushed a commit that referenced this pull request Jan 2, 2022
* Fix some possible panics when using `--check` with stdin.

One case which doesn't work is when there are only line ending fixes;
with stdin rustfmt is unable to detect the difference as it stores
the input with Unix line endings.

* Add test for `rustfmt --check -l` with stdin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants