rust/compiler/rustc_mir_build/src
Aaron Hill cac431ba75
Store a DefId instead of an AdtDef in AggregateKind::Adt
The `AggregateKind` enum ends up in the final mir `Body`. Currently,
any changes to `AdtDef` (regardless of how significant they are)
will legitimately cause the overall result of `optimized_mir` to change,
invalidating any codegen re-use involving that mir.

This will get worse once we start hashing the `Span` inside `FieldDef`
(which is itself contained in `AdtDef`).

To try to reduce these kinds of invalidations, this commit changes
`AggregateKind::Adt` to store just the `DefId`, instead of the full
`AdtDef`. This allows the result of `optimized_mir` to be unchanged
if the `AdtDef` changes in a way that doesn't actually affect any
of the MIR we build.
2021-12-22 14:36:34 -05:00
..
build Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
thir Rollup merge of #91791 - terrarier2111:fix-float-ice, r=nagisa 2021-12-19 17:38:33 +01:00
check_unsafety.rs Use more let_else in rustc_mir_build 2021-11-18 18:22:19 +01:00
lib.rs Stabilize iter::zip. 2021-12-14 18:50:31 -04:00
lints.rs