Skip to content

When AsyncDrop impl is empty, sync drop generated in elaborator #141328

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented May 21, 2025

Fixes #140974.

@rustbot
Copy link
Collaborator

rustbot commented May 21, 2025

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 21, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

let Some(drop_fn_def_id) =
tcx.associated_item_def_ids(drop_trait).into_iter().nth(0).copied()
else {
self.elaborator.patch().patch_terminator(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delay a bug first, to make sure we actually emit an error somewhere

@azhogin azhogin force-pushed the azhogin/async-drop-ice-for-empty-impl-fix branch from 38161a8 to dc794f1 Compare May 21, 2025 11:18
@oli-obk
Copy link
Contributor

oli-obk commented May 21, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 21, 2025

📌 Commit dc794f1 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 May 21, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 21, 2025
…-empty-impl-fix, r=oli-obk

When AsyncDrop impl is empty, sync drop generated in elaborator

Fixes rust-lang#140974.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#141267 (only resolve top-level guard patterns' guards once)
 - rust-lang#141280 (Use Docker cache from the current repository)
 - rust-lang#141296 (Async drop fix for 'broken mir, place has deref as later projection')
 - rust-lang#141328 (When AsyncDrop impl is empty, sync drop generated in elaborator)
 - rust-lang#141332 (Do not eagerly fold consts in `normalize_param_env_or_error` if new solver)
 - rust-lang#141333 (Use `DeepRejectCtxt` in `assemble_inherent_candidates_from_param`)
 - rust-lang#141334 (eagerly check nested obligations when coercing fndefs)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

ICE: elaborate drop: index out of bounds
4 participants