Allow unnormalized types in drop elaboration#148719
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
|
|
r? compiler |
|
Seems fine, but I'm not too sure about the impact of this change @rustbot reroll |
|
Maybe cc @matthewjasper (the error was introduced in #136539). |
|
I'll give a few days for a response, but I agree with your reasoning in the PR description. |
|
I think this change is fine, borrow checking should catch the actual errors here. |
|
@bors r+ |
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
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.
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
CoworNonZero.This PR removes the one check for unnormalized types in drop elaboration. It's a
span_delay_bugso 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.