Skip to content

Fix extra subslice lowering - #69128

Merged
bors merged 1 commit into
rust-lang:masterfrom
Centril:fix-69103
Feb 15, 2020
Merged

Fix extra subslice lowering#69128
bors merged 1 commit into
rust-lang:masterfrom
Centril:fix-69103

Conversation

@Centril

Copy link
Copy Markdown
Contributor

We are currently ICEing on e.g.

fnmain(){let[.., b @ ..] = [1,2];
b;}

This happens because b @ .. registers a binding such that b; is OK, but then we forget to lower that binding in rustc_ast_lowering.

Fixes#69103.

r? @davidtwco

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 13, 2020
@CentrilCentril added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 13, 2020
@nikomatsakisnikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Feb 13, 2020
@nikomatsakis

Copy link
Copy Markdown
Contributor

Discussed in the T-compiler triage meeting this morning and decided to approve for beta backport.

@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Feb 14, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit f5bd964 has been approved by davidtwco

@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 Feb 14, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 14, 2020
Fix extra subslice lowering
We are currently ICEing on e.g.
```rust
fn main() {
let [.., b @ ..] = [1, 2];
b;
}
```
This happens because `b @ ..` registers a binding such that `b;` is OK, but then we forget to lower that binding in `rustc_ast_lowering`.
Fixesrust-lang#69103.
r? @davidtwco
@JohnTitorJohnTitor mentioned this pull request Feb 14, 2020
bors added a commit that referenced this pull request Feb 14, 2020
Rollup of 7 pull requests
Successful merges:
- #68129 (Correct inference of primitive operand type behind binary operation)
- #68475 (Use a `ParamEnvAnd<Predicate>` for caching in `ObligationForest`)
- #68856 (typeck: clarify def_bm adjustments & add tests for or-patterns)
- #69051 (simplify_try: address some of eddyb's comments)
- #69128 (Fix extra subslice lowering)
- #69150 (Follow-up to #68848)
- #69164 (Update pulldown-cmark dependency)
Failed merges:
r? @ghost
@bors
bors merged commit f5bd964 into rust-lang:masterFeb 15, 2020
@Centril
Centril deleted the fix-69103 branch February 15, 2020 10:57
@Mark-SimulacrumMark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 21, 2020
bors added a commit that referenced this pull request Feb 24, 2020
[beta] beta backports
This backports the following PRs:
* Revert "Remove `checked_add` in `Layout::repeat`" #69241
* Do not ICE when encountering `yield` inside `async` block #69175
* Fix MIR typeck soundness holes #69145
* Fix extra subslice lowering #69128
* Correct ICE caused by macros generating invalid spans. #68611
* Make conflicting_repr_hints a deny-by-default c-future-compat lint #68586
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.

ICE: multiple @ bindings of slice patterns, e.g. [a @ .., b @ ..]

6 participants

@Centril@nikomatsakis@davidtwco@bors@Mark-Simulacrum@rust-highfive