Skip to content

Avoid ICE when checking Destination of break inside a closure - #65518

Merged
bors merged 1 commit into
rust-lang:masterfrom
estebank:i-want-to-break-free
Oct 24, 2019
Merged

Avoid ICE when checking Destination of break inside a closure#65518
bors merged 1 commit into
rust-lang:masterfrom
estebank:i-want-to-break-free

Conversation

@estebank

@estebankestebank commented Oct 17, 2019

Copy link
Copy Markdown
Contributor

Fix#65383, fix#62480. This is a [regression-from-stable-to-stable] and a fairly small change to avoid the ICE by properly handling this case.

@estebankestebank added beta-nominated Nominated for backporting to the compiler in the beta channel. stable-nominated Nominated for backporting to the compiler in the stable channel. labels Oct 17, 2019
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2019
@estebankestebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 17, 2019
@estebank

Copy link
Copy Markdown
ContributorAuthor

CC @Centril@pnkfelix

Comment threadsrc/librustc_typeck/check/expr.rs Outdated
Comment threadsrc/librustc_typeck/check/expr.rs Outdated
Comment threadsrc/librustc_typeck/check/mod.rs Outdated
Comment threadsrc/test/ui/issues/issue-65383.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

(It would also be good to make a note of, in the PR description, why it is beta & stable nominated)

@estebank
estebankforce-pushed the i-want-to-break-free branch 2 times, most recently from 86f4f14 to 4cb66fbCompareOctober 17, 2019 21:21
@estebank
estebankforce-pushed the i-want-to-break-free branch from 4cb66fb to 0585475CompareOctober 18, 2019 01:18
@est31

Copy link
Copy Markdown
Member

Does this also fix #62480 ?

@estebank

Copy link
Copy Markdown
ContributorAuthor

@est31 yes. Just verified.

@eddybeddyb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me with or without a test

@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors r=eddyb

There were tests added already.

@bors

bors commented Oct 23, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 0585475 has been approved by eddyb

@borsbors 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 Oct 23, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 23, 2019
Avoid ICE when checking `Destination` of `break` inside a closure
Fixrust-lang#65383, fixrust-lang#62480. This is a `[regression-from-stable-to-stable]` and a fairly small change to avoid the ICE by properly handling this case.
@CentrilCentril mentioned this pull request Oct 23, 2019
bors added a commit that referenced this pull request Oct 24, 2019
Rollup of 12 pull requests
Successful merges:
- #64178 (More Clippy fixes for alloc, core and std)
- #65144 (Add Cow::is_borrowed and Cow::is_owned)
- #65193 (Lockless LintStore)
- #65479 (Add the `matches!( $expr, $pat ) -> bool` macro)
- #65518 (Avoid ICE when checking `Destination` of `break` inside a closure)
- #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.)
- #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.)
- #65648 (Eliminate `intersect_opt`.)
- #65657 (Remove `InternedString`)
- #65691 (Update E0659 error code long explanation to 2018 edition)
- #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL)
- #65704 (relax ExactSizeIterator bound on write_bytes)
Failed merges:
r? @ghost
@bors
bors merged commit 0585475 into rust-lang:masterOct 24, 2019
@nikomatsakisnikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 24, 2019
@nikomatsakis

Copy link
Copy Markdown
Contributor

Discussed in the @rust-lang/compiler meeting, accepted for beta backport.

@nikomatsakis

Copy link
Copy Markdown
Contributor

We are also giving a "technical 👍" for stable backport, I believe final decision there is made by @rust-lang/release though.

@emilyalbiniemilyalbini added the stable-accepted Accepted for backporting to the compiler in the stable channel. label Oct 24, 2019
@emilyalbini

Copy link
Copy Markdown
Member

@nikomatsakis you should add the stable-accepted for the "technical 👍" btw, the release team then decides what to do based on the amount of stable-accepted stuff.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Release team discussed and decided to deny stable backport given that next release is 2 weeks out and this is not a fix in the sense that it is just moving ICEs to errors, not error -> building code or so.

(Procedural note: we don't really have a good process for doing this denial, so I'll just drop both labels.)

@Mark-SimulacrumMark-Simulacrum removed stable-accepted Accepted for backporting to the compiler in the stable channel. stable-nominated Nominated for backporting to the compiler in the stable channel. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Oct 24, 2019
bors added a commit that referenced this pull request Oct 26, 2019
[beta] backport rollup
This includes a bunch of PRs:
* Fix redundant semicolon lint interaction with proc macro attributes #64387
* Upgrade async/await to "used" keywords. #64875
* syntax: fix dropping of attribute on first param of non-method assocated fn #64894
* async/await: improve not-send errors #64895
* Silence unreachable code lint from await desugaring #64930
* Always mark rust and rust-call abi's as unwind #65020
* Account for macro invocation in `let mut $pat` diagnostic. #65123
* Ensure that associated `async fn`s have unique fresh param names #65142
* Add troubleshooting section to PGO chapter in rustc book. #65402
* Upgrade GCC to 8.3.0, glibc to 1.17.0 and crosstool-ng to 1.24.0 for dist-armv7-linux #65302
* Optimize `try_expand_impl_trait_type` #65293
* use precalculated dominators in explain_borrow #65172
* Fix ICE #64964#64989
* [beta] Revert "Auto merge of #62948 - matklad:failable-file-loading, r=petro… #65273
* save-analysis: Don't ICE when resolving qualified type paths in struct members #65353
* save-analysis: Nest tables when processing impl block definitions #65511
* Avoid ICE when checking `Destination` of `break` inside a closure #65518
* Avoid ICE when adjusting bad self ty #65755
* workaround msys2 bug #65762
@estebank
estebank deleted the i-want-to-break-free branch November 9, 2023 05:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

Could not find enclosing breakable with id HirId Internal compiler error with labeled break inside closure

9 participants

@estebank@rust-highfive@Centril@est31@bors@nikomatsakis@emilyalbini@Mark-Simulacrum@eddyb