Skip to content

Conversation

@Nadrieril
Copy link
Member

I work on a rustc driver that aims to extract the full polymorphic MIR of a crate. Currently the one thing I can't get is drop glue because it fails on unnormalizable types like the fields of Cow or NonZero.

This PR removes the one check for unnormalized types in drop elaboration. It's a span_delay_bug so only there to help catch mistakes. I think that's fine to remove? If something downstream relies on types being normalized the right approach is for MIR validation to check for normalized types, not that one random check.

@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Nov 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
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
Copy link
Collaborator

rustbot commented Nov 9, 2025

⚠️ Warning ⚠️

@Nadrieril
Copy link
Member Author

r? compiler

@rustbot rustbot assigned fee1-dead and unassigned SparrowLii Nov 17, 2025
@fee1-dead
Copy link
Member

Seems fine, but I'm not too sure about the impact of this change

@rustbot reroll

@rustbot rustbot assigned saethlin and unassigned fee1-dead Nov 18, 2025
@Nadrieril
Copy link
Member Author

Maybe cc @matthewjasper (the error was introduced in #136539).

@saethlin
Copy link
Member

I'll give a few days for a response, but I agree with your reasoning in the PR description.

@matthewjasper
Copy link
Contributor

I think this change is fine, borrow checking should catch the actual errors here.

@saethlin
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 21, 2025

📌 Commit b476969 has been approved by saethlin

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 Nov 21, 2025
bors added a commit that referenced this pull request Nov 21, 2025
Rollup of 7 pull requests Successful merges: - #146978 (Emit error when using path-segment keyword as cfg pred) - #148719 (Allow unnormalized types in drop elaboration) - #148795 (add `rust.rustflags` and per target `rustflags` options to `bootstrap.toml`) - #149028 ([rustdoc] Remove `UrlFragment::render` method to unify `clean::types::links` and `anchor`) - #149043 ( rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution) - #149098 (Fix error message for calling a non-tuple struct) - #149151 (Add test for importing path-segment keyword) r? `@ghost` `@rustbot` modify labels: rollup
@bors bors merged commit 60ed1ab into rust-lang:main Nov 21, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 21, 2025
rust-timer added a commit that referenced this pull request Nov 22, 2025
Rollup merge of #148719 - Nadrieril:poly-drop-glue, r=saethlin Allow unnormalized types in drop elaboration I work on a [rustc driver](https://github.com/AeneasVerif/charon) that aims to extract the full polymorphic MIR of a crate. Currently the one thing I can't get is drop glue because it fails on unnormalizable types like the fields of `Cow` or `NonZero`. This PR removes the one check for unnormalized types in drop elaboration. It's a `span_delay_bug` so only there to help catch mistakes. I think that's fine to remove? If something downstream relies on types being normalized the right approach is for MIR validation to check for normalized types, not that one random check.
@Nadrieril Nadrieril deleted the poly-drop-glue branch November 24, 2025 13:35
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.

7 participants