Skip to content

Add reset_err_count() to errors::Handler - #43778

Merged
bors merged 1 commit into
rust-lang:masterfrom
topecongiro:handler-reset-err-count
Aug 30, 2017
Merged

Add reset_err_count() to errors::Handler#43778
bors merged 1 commit into
rust-lang:masterfrom
topecongiro:handler-reset-err-count

Conversation

@topecongiro

Copy link
Copy Markdown
Contributor

The motivation here is to allow rustfmt to recover from parse errors after failing to parse macros (cc rust-lang/rustfmt#1742).
r? @nrc

@aidanhs

Copy link
Copy Markdown
Contributor

Thanks for the PR @topecongiro! We'll check in now and again to make sure @nrc or another reviewer gets to this soon.

@alexcrichtonalexcrichton added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2017
@carols10cents

Copy link
Copy Markdown
Member

friendly ping @nrc !

1 similar comment
@arielb1

Copy link
Copy Markdown
Contributor

friendly ping @nrc !

@nrc

nrc commented Aug 22, 2017

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Aug 22, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit a326948 has been approved by nrc

@nrcnrc added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 22, 2017
@arielb1

arielb1 commented Aug 22, 2017

Copy link
Copy Markdown
Contributor

rustc relies on err_count being non-zero if an error happened to avoid ICEs. Could you at least add a comment that this method is dangerous @topecongiro?

@bors r-

@nrc

nrc commented Aug 22, 2017

Copy link
Copy Markdown
Member

@bors r-

Comment threadsrc/librustc_errors/lib.rs Outdated

Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arielb1@nrc Thanks for comments! I will update shortly.

@arielb1arielb1 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 22, 2017
The motivation here is to allow rustfmt to recover from parse errors
after failing to parse macros.
@topecongiro
topecongiroforce-pushed the handler-reset-err-count branch from a326948 to 601e3daCompareAugust 23, 2017 12:56
@topecongiro

Copy link
Copy Markdown
ContributorAuthor

Updated & rebased.

@carols10centscarols10cents added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 28, 2017
@carols10cents

Copy link
Copy Markdown
Member

Looks like this is back in your court @nrc !

@arielb1

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Aug 29, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 601e3da has been approved by arielb1

@arielb1

Copy link
Copy Markdown
Contributor

@bors rollup

@arielb1arielb1 added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2017
arielb1 pushed a commit to arielb1/rust that referenced this pull request Aug 29, 2017
…, 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
@arielb1arielb1 mentioned this pull request Aug 29, 2017
@arielb1arielb1 mentioned this pull request Aug 29, 2017
arielb1 pushed a commit to arielb1/rust that referenced this pull request Aug 29, 2017
…, 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
@arielb1arielb1 mentioned this pull request Aug 29, 2017
bors added a commit that referenced this pull request Aug 29, 2017
Rollup of 12 pull requests
- Successful merges: #43705, #43778, #43918, #44076, #44117, #44121, #44126, #44134, #44135, #44141, #44144, #44158
- Failed merges:
@bors
bors merged commit 601e3da into rust-lang:masterAug 30, 2017
@topecongiro

Copy link
Copy Markdown
ContributorAuthor

Thank you!

@topecongiro
topecongiro deleted the handler-reset-err-count branch August 30, 2017 10:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@topecongiro@aidanhs@carols10cents@arielb1@nrc@bors@alexcrichton