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

Handle errors during error recovery gracefully #62604

Merged
merged 1 commit into from
Jul 13, 2019

Conversation

estebank
Copy link
Contributor

Fix #62546.

@estebank estebank added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 11, 2019
@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2019
@estebank
Copy link
Contributor Author

estebank commented Jul 12, 2019

cc @petrochenkov @pnkfelix

Ok(Some(_)) => "method",
Ok(None) => "function",
Err(mut err) => {
err.cancel();
Copy link
Member

Choose a reason for hiding this comment

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

You could also use .map_err(|e| e.cancel()).

Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

r=me

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 12, 2019

📌 Commit e1c7747 has been approved by pnkfelix

@bors bors 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 Jul 12, 2019
@Mark-Simulacrum
Copy link
Member

I noted that @estebank mentioned in #62637 that this might warrant a stable point release. The release team has no current plans to conduct one, and it is somewhat harder to do this cycle, so we'd like to avoid it if possible -- is this sufficiently high impact to warrant that? It feels like it's not too severe to me? If you decide you would like to consider a stable release, please label this PR with the stable-nominated tag and ask compiler team to approve stable backport; if that all follows release team will discuss whether we would agree that this warrants a stable backport.

To summarize, stable point release process is as follows:

  • compiler team approves code as being safe and acceptable for backport to stable (this is same as with beta, but the bar for safety is higher, as we get into ecosystem hands much more quickly and with less testing)
  • release team discusses whether stable point release is warranted, and if so informs compilers team and proceeds

@estebank
Copy link
Contributor Author

@Mark-Simulacrum I should have linked to PR #62607, not this PR. That PR is already nominated and should be discussed next thursday. I feel that PR is certainly bad but not enough to justify a point release.

Centril added a commit to Centril/rust that referenced this pull request Jul 13, 2019
bors added a commit that referenced this pull request Jul 13, 2019
Rollup of 5 pull requests

Successful merges:

 - #62577 (Add an AtomicCell abstraction)
 - #62585 (Make struct_tail normalize when possible)
 - #62604 (Handle errors during error recovery gracefully)
 - #62636 (rustbuild: Improve assert about building tools once)
 - #62651 (Make some rustc macros more hygienic)

Failed merges:

r? @ghost
@bors bors merged commit e1c7747 into rust-lang:master Jul 13, 2019
@estebank estebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 13, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 16, 2019
Cancel unemitted diagnostics during error recovery

Follow up to rust-lang#62604. Use @eddyb's preferred style and catch other case of the same problem.

r? @eddyb
@nagisa nagisa added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 18, 2019
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 22, 2019
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
@estebank estebank deleted the unemitted-err-ice branch November 9, 2023 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal compiler error: Error constructed but not emitted
8 participants