Repository navigation
Fix ICE in tail_expr_drop_order lint with async drops - #166003
Merged
Merged
Conversation
Collaborator
|
This PR changes a file inside |
Collaborator
|
Thanks for the pull request, and welcome! The Rust Project has assigned @panstromek (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Contributor
Author
sorry about that |
Contributor
|
This looks correct to me but I don't know this part of the codebase well enough to say definitely. r? cjgillot maybe? |
Contributor
|
@bors r+ |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 17, 2026
Rollup of 15 pull requests Successful merges: - #166054 (stdarch subtree update) - #165939 (Convert `pretty-std` debuginfo test to `gdb-repr`) - #165289 (lexer: Update to Unicode 18) - #165960 (alloctests: use thread-local in `c_str_alloc_error`) - #166002 (#[optimize]: keep low opt levels unoptimized) - #166003 (Fix ICE in tail_expr_drop_order lint with async drops) - #166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets) - #165200 (fix abi kind of thumb windows targets) - #165966 (Document failing cases for spawning processes when using Command) - #165999 (Update TPDE submodule) - #166045 (rustdoc: Correctly filter deref impls on type aliases) - #166063 (Fix bad hyperlink) - #166066 (Update books) - #166072 (simplify Appearances iter) - #166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 17, 2026
Rollup merge of #166003 - coleleavitt:main, r=cjgillot Fix ICE in tail_expr_drop_order lint with async drops fixes #142155. `ForLint` arm of `build_scope_drops` doesnt advance `dropline_to`. `diverge_dropline_target` adds a coroutine drop-tree node for every scheduled drop (Value, Storage, ForLint) but only Value and Storage step the cursor. when `tail_expr_drop_order` is enabled (`-W rust-2024-compatibility`, `cargo fix --edition`) and the scope has an async-drop value the cursor lags one node and the Storage arm's `debug_assert_eq!` fires. The fix adds the same 4-line if-let block the Storage arm has. #164987 attempted a fix in `needs_async_drop` which was reverted in #165266.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #142155.
ForLintarm ofbuild_scope_dropsdoesnt advancedropline_to.diverge_dropline_targetadds a coroutine drop-tree node for every scheduled drop (Value, Storage, ForLint) but only Value and Storage step the cursor. whentail_expr_drop_orderis enabled (-W rust-2024-compatibility,cargo fix --edition) and the scope has an async-drop value the cursor lags one node and the Storage arm'sdebug_assert_eq!fires. The fix adds the same 4-line if-let block the Storage arm has. #164987 attempted a fix inneeds_async_dropwhich was reverted in #165266.