rust/compiler/rustc_borrowck/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
..
constraints Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
diagnostics Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
region_infer Store impl_trait_fn inside OpaqueTyOrigin. 2021-12-07 21:30:45 +01:00
type_check Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
borrow_set.rs Remove in_band_lifetimes from borrowck 2021-12-15 08:39:21 +01:00
borrowck_errors.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
constraint_generation.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
consumers.rs Add InferCtxt::with_opaque_type_inference to get_body_with_borrowck_facts 2021-10-06 19:07:56 -07:00
dataflow.rs Add initial AST and MIR support for unwinding from inline assembly 2021-12-03 23:51:46 +01:00
def_use.rs Add initial AST and MIR support for unwinding from inline assembly 2021-12-03 23:51:46 +01:00
facts.rs Move the dataflow framework to its own crate. 2021-09-07 19:57:07 +02:00
invalidation.rs Add initial AST and MIR support for unwinding from inline assembly 2021-12-03 23:51:46 +01:00
lib.rs Remove in_band_lifetimes from borrowck 2021-12-15 08:39:21 +01:00
location.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
member_constraints.rs Remove in_band_lifetimes from borrowck 2021-12-15 08:39:21 +01:00
nll.rs Rename functions reflect that inline const is also "typeck_child" 2021-11-07 04:00:34 +00:00
path_utils.rs Remove in_band_lifetimes from borrowck 2021-12-15 08:39:21 +01:00
place_ext.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
places_conflict.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
prefixes.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00
renumber.rs Visit type in process_projection_elem. 2021-11-27 17:39:27 +01:00
universal_regions.rs Rename functions reflect that inline const is also "typeck_child" 2021-11-07 04:00:34 +00:00
used_muts.rs Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02:00