Skip to content

Avoid duplicating StorageLive in let-else#101894

Merged
bors merged 3 commits intorust-lang:masterfrom
dingxiangfei2009:let-else-avoid-duplicate-storage-live
Sep 19, 2022
Merged

Avoid duplicating StorageLive in let-else#101894
bors merged 3 commits intorust-lang:masterfrom
dingxiangfei2009:let-else-avoid-duplicate-storage-live

Conversation

@dingxiangfei2009
Copy link
Copy Markdown
Contributor

@dingxiangfei2009 dingxiangfei2009 commented Sep 16, 2022

cc @est31

Fix #101867
Fix #101932

#101410 introduced directives to activate storages of bindings in let-else earlier. However, since it is using the machinery of match and friends for pattern matching and binding, those storages are activated for the second time. This PR adjusts this behavior and avoid the duplicated activation for let-else statements.

Loading
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. merged-by-bors This PR was explicitly merged by bors. 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.

StorageLive already live in const let else regression miri no longer builds after rust-lang/rust#101410