-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Clean emitted diagnostics when reset_err_count
is called.
#47231
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I'm not sure if |
It would be nice if you could add some kind of rustdoc comment explaining the purpose of that function -- right now the only comment tells you not to call it, but doesn't explain when or why a tool would call it... |
When external tools like `rustfmt` calls to `reset_err_count` for handler reusing, it will set the error count on the handler to 0, but since #47146 the handler will contain status that will prevent the error count to be bumped if this handler is reused. This caused `rustfmt` idempotency tests to fail: rust-lang/rustfmt#2338 Fixes: rust-lang/rustfmt#2338
@nikomatsakis done, let me know if needs more polishing :) |
@bors: r+ p=1 (fixes rustfmt) Thanks @ereslibre ! (I think keeping the name |
📌 Commit b48d944 has been approved by |
Clean emitted diagnostics when `reset_err_count` is called. When external tools like `rustfmt` calls to `reset_err_count` for handler reusing, it will set the error count on the handler to 0, but since #47146 the handler will contain status that will prevent the error count to be bumped if this handler is reused. This caused `rustfmt` idempotency tests to fail: rust-lang/rustfmt#2338 Fixes: rust-lang/rustfmt#2338
☀️ Test successful - status-appveyor, status-travis |
Tested on commit rust-lang/rust@2e33c89. 🎉 rustfmt on windows: test-fail → test-pass. 🎉 rustfmt on linux: test-fail → test-pass.
When external tools like
rustfmt
calls toreset_err_count
for handlerreusing, it will set the error count on the handler to 0, but since
#47146 the handler will contain
status that will prevent the error count to be bumped if this handler is
reused.
This caused
rustfmt
idempotency tests to fail:rust-lang/rustfmt#2338
Fixes: rust-lang/rustfmt#2338