-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add reset_err_count() to errors::Handler #43778
Conversation
Thanks for the PR @topecongiro! We'll check in now and again to make sure @nrc or another reviewer gets to this soon. |
friendly ping @nrc ! |
1 similar comment
friendly ping @nrc ! |
@bors: r+ |
📌 Commit a326948 has been approved by |
@bors r- |
@bors r- |
src/librustc_errors/lib.rs
Outdated
@@ -303,6 +303,10 @@ impl Handler { | |||
self.continue_after_error.set(continue_after_error); | |||
} | |||
|
|||
pub fn reset_err_count(&self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment to this stating that it should not be called in rustc, only by tools (it would break the compiler's error handling)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros.
a326948
to
601e3da
Compare
Updated & rebased. |
Looks like this is back in your court @nrc ! |
@bors r+ |
📌 Commit 601e3da has been approved by |
@bors rollup |
…, r=arielb1 Add reset_err_count() to errors::Handler The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742). r? @nrc
…, r=arielb1 Add reset_err_count() to errors::Handler The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742). r? @nrc
Thank you! |
The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742).
r? @nrc