-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Avoid duplicating StorageLive in let-else #101894
Avoid duplicating StorageLive in let-else #101894
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
|
Please also add a mir-opt test. #101410 (comment) seems like a good candidate as it is very minimal. |
@dingxiangfei2009 now that #93628 has been merged, can you rebase this PR? Most importantly, the test files will need Also, would it be possible to add the example from #101932 as a run-pass regression test? So add |
a7d87c9
to
eb36f5e
Compare
This issue is completely blocking Miri development, would be good to get the fix landed ASAP. :) |
@bors r+ p=1 (unblocks miri) |
@bors p=10 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2019147): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
Judging from this the release team will do the beta backports so I consider this done from my end now. :) |
…gfei2009 Fix lint scoping for let-else. The scoping for let-else is inconsistent with HIR nesting. This creates cases, in `ui/let-else/let-else-allow-unused.rs` for instance, where an `allow` lint attribute does not apply to the bindings created by `let-else`. This PR is an attempt to correct this. As there is no lint that currently relies on this, the test for this behaviour is rust-lang#101500. cc `@dingxiangfei2009` as you filed rust-lang#101894
…ei2009 Fix lint scoping for let-else. The scoping for let-else is inconsistent with HIR nesting. This creates cases, in `ui/let-else/let-else-allow-unused.rs` for instance, where an `allow` lint attribute does not apply to the bindings created by `let-else`. This PR is an attempt to correct this. As there is no lint that currently relies on this, the test for this behaviour is rust-lang#101500. cc `@dingxiangfei2009` as you filed rust-lang#101894
[beta] backports * Avoid duplicating StorageLive in let-else rust-lang#101894 * Re-add HRTB implied static bug note rust-lang#101924 * Revert "Copy stage0 binaries into stage0-sysroot" rust-lang#101942 * implied_bounds: deal with inference vars rust-lang#102016 * fix ConstProp handling of written_only_inside_own_block_locals rust-lang#102045 * Fix wrongly refactored Lift impl rust-lang#102088 * Fix a typo “pararmeter” in error message rust-lang#102119 * Deny associated type bindings within associated type bindings rust-lang#102338 * Continue migration of CSS themes rust-lang#101934 * Fix search result colors rust-lang#102369 * Fix unwind drop glue for if-then scopes rust-lang#102394 * Revert "Use getentropy when possible on all Apple platforms" rust-lang#102693 * Fix associated type bindings with anon const in GAT position rust-lang#102336 * Revert perf-regression 101620 rust-lang#102064 * `EscapeAscii` is not an `ExactSizeIterator` rust-lang#99880
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.