rust/compiler/rustc_mir_dataflow/src
Dylan DPC 828caa80a9
Rollup merge of #110930 - b-naber:normalize-elaborate-drops, r=cjgillot
Don't expect normalization to succeed in elaborate_drops

Fixes https://github.com/rust-lang/rust/issues/110682

This was exposed through the changes in https://github.com/rust-lang/rust/pull/109247, which causes more things to be inlined. Inlining can happen before monomorphization, so we can't expect normalization to succeed. In the elaborate_drops analysis we currently have [this call](033aa092ab/compiler/rustc_mir_dataflow/src/elaborate_drops.rs (L278)) to `normalize_erasing_regions`, which ICEs when normalization fails. The types are used to infer [whether the type needs a drop](033aa092ab/compiler/rustc_mir_dataflow/src/elaborate_drops.rs (L374)), where `needs_drop` itself [uses `try_normalize_erasing_regions`](033aa092ab/compiler/rustc_middle/src/ty/util.rs (L1121)).

~[`instance_mir`](https://doc.rust-lang.org/stable/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.instance_mir) isn't explicit about whether it expects the instances corresponding to the `InstanceDef`s to be monomorphized (though I think in all other contexts the function is used post-monomorphization), so the use of `instance_mir` in inlining doesn't necessarily seem wrong to me.~
2023-05-17 19:11:53 +05:30
..
framework Make HasTop and HasBottom consts. 2023-05-09 17:27:58 +00:00
impls Explicitly skip arguments. 2023-05-09 17:59:35 +00:00
move_paths Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
drop_flag_effects.rs Treat Drop as a rmw operation 2023-01-30 00:20:40 +01:00
elaborate_drops.rs don't inline polymorphic adt instances whose fields contain projections 2023-05-10 16:03:52 +00:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_peek.rs Rollup merge of #99027 - tmiasko:basic-blocks, r=oli-obk 2022-08-29 06:34:43 +02:00
storage.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
un_derefer.rs Auto merge of #99667 - ouz-a:some_branch, r=oli-obk 2022-07-29 07:11:50 +00:00
value_analysis.rs Prevent stack overflow. 2023-05-09 17:27:58 +00:00