Skip to content

2229: Consume IfLet expr - #89282

Merged
bors merged 2 commits into
rust-lang:masterfrom
sexxi-goose:fix-88118
Sep 30, 2021
Merged

2229: Consume IfLet expr#89282
bors merged 2 commits into
rust-lang:masterfrom
sexxi-goose:fix-88118

Conversation

@roxelo

Copy link
Copy Markdown
Contributor

When using the IfLet guard feature, we can ICE when attempting to resolve PlaceBuilders.
For pattern matching, we currently don't consume the IfLet expression when "visiting" the arms leading us to not "read" all variables and hence not being able to resolve them.

r? @nikomatsakis
Closes#88118

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 26, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

self.consume_expr(e)
} else if let Some(hir::Guard::IfLet(_, ref e)) = arm.guard {
self.consume_expr(e)
}

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.

This can be an exhaustive match

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+ p=1

@bors

bors commented Sep 30, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit d0e2b60 has been approved by nikomatsakis

@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 Sep 30, 2021
@nikomatsakisnikomatsakis added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 30, 2021
@nikomatsakis

Copy link
Copy Markdown
Contributor

Nominating for beta backport, I believe this affects the Rust 2021 edition that is in beta.

@bors

bors commented Sep 30, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d0e2b60 with merge aa7aca3...

@bors

bors commented Sep 30, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing aa7aca3 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 30, 2021
@bors
bors merged commit aa7aca3 into rust-lang:masterSep 30, 2021
@rustbotrustbot added this to the 1.57.0 milestone Sep 30, 2021
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (aa7aca3): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@apirainoapiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 7, 2021
@apiraino

Copy link
Copy Markdown
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbotrustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 7, 2021
@cuvipercuviper mentioned this pull request Oct 13, 2021
@cuvipercuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 13, 2021
@cuvipercuviper modified the milestones: 1.57.0, 1.56.0Oct 13, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2021
[beta] backports
- 2229: Consume IfLet expr rust-lang#89282
- Wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavor rust-lang#89288
- Fix unsound optimization with explicit variant discriminants rust-lang#89489
- Fix stabilization version for bindings_after_at rust-lang#89605
- Turn vtable_allocation() into a query rust-lang#89619
- Revert "Stabilize Iterator::intersperse()" rust-lang#89638
- Ignore type of projections for upvar capturing rust-lang#89648
- ~~Add Poll::ready and~~ revert stabilization of task::ready! rust-lang#89651
- CI: Use mirror for libisl downloads for more docker dist builds rust-lang#89661
- Use correct edition for panic in [debug_]assert!(). rust-lang#89622
- Switch to our own mirror of libisl plus ct-ng oldconfig fixesrust-lang#89599
- Emit item no type error even if type inference fails rust-lang#89585
- Revert enum discriminants rust-lang#89884
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.merged-by-borsThis PR was explicitly merged by bors.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.

PlaceBuilder ICE, Part 2

10 participants

@roxelo@rust-log-analyzer@nikomatsakis@bors@rust-timer@apiraino@camsteffen@cuviper@rust-highfive@rustbot