Fix coroutine MIR saved local remapping#158655
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? cjgillot who probably has more context |
f809a69 to
fd23727
Compare
|
@rustbot ready |
Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
fd23727 to
aa485b2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
aa485b2 to
bb63725
Compare
This comment has been minimized.
This comment has been minimized.
bb63725 to
81a734f
Compare
Storage is still required even if the local is moved out and immediately moved in again. Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
81a734f to
401dc21
Compare
|
@rustbot ready |
|
@cjgillot Thank you for your review! I have applied the suggestions. Let me know any other outstanding concerns. Cheers! |
|
Great ! |
|
@bors try jobs=aarch64-gnu-debug |
|
Unknown command "jobs". Run |
|
@bors try jobs=aarch64-gnu-debug |
This comment has been minimized.
This comment has been minimized.
Fix coroutine MIR saved local remapping try-job: aarch64-gnu-debug
|
@jhpratt Okay it looks like the previous failure was due to another PR in the rollup. Shall we proceed? |
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
Fix coroutine MIR saved local remapping The unsound analysis was found while I was working on the `async-drop` code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local. Also we did not patch up indices in `ProjectionElem::Index` when they are saved locals. The reproduction is in the older commit with the expected output.
|
💔 Test for 71a41fd failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Hmm spicy segv... I will look into this |
|
@bors try jobs=dist-android |
This comment has been minimized.
This comment has been minimized.
Fix coroutine MIR saved local remapping try-job: dist-android
|
@bors r+ I think CI experienced some memory pressure. |
…dingxiangfei2009 Fix coroutine MIR saved local remapping The unsound analysis was found while I was working on the `async-drop` code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local. Also we did not patch up indices in `ProjectionElem::Index` when they are saved locals. The reproduction is in the older commit with the expected output.
Rollup of 11 pull requests Successful merges: - #159210 (`rust-analyzer` subtree update) - #158655 (Fix coroutine MIR saved local remapping) - #159205 (bootstrap: Replace `ShouldRun::crates` with `crate_or_deps_filtered`) - #159208 (Fix `attr_on_non_tail_expr` typo) - #157524 (Fix relative paths in private import suggestions) - #158325 (Document NonNull layout guarantees) - #158882 (enable `do_not_recommend` attr for method call errors in current solver) - #158982 (Pretty-print MIR user types too.) - #159069 (Add codegen test for constant returns after local use) - #159163 (rustc_target: Add acquire-release to implied features of v8) - #159201 (borrowck: Represent 'best blame constraint' as index into `Vec<OutlivesConstraint>`)
Rollup of 11 pull requests Successful merges: - #159210 (`rust-analyzer` subtree update) - #158655 (Fix coroutine MIR saved local remapping) - #159205 (bootstrap: Replace `ShouldRun::crates` with `crate_or_deps_filtered`) - #159208 (Fix `attr_on_non_tail_expr` typo) - #157524 (Fix relative paths in private import suggestions) - #158325 (Document NonNull layout guarantees) - #158882 (enable `do_not_recommend` attr for method call errors in current solver) - #158982 (Pretty-print MIR user types too.) - #159069 (Add codegen test for constant returns after local use) - #159163 (rustc_target: Add acquire-release to implied features of v8) - #159201 (borrowck: Represent 'best blame constraint' as index into `Vec<OutlivesConstraint>`)
View all comments
The unsound analysis was found while I was working on the
async-dropcode. Apparently the counter variable in the array drop glue is not correctly identified as a saved local.Also we did not patch up indices in
ProjectionElem::Indexwhen they are saved locals.The reproduction is in the older commit with the expected output.