rust/compiler/rustc_middle/src
Matthias Krüger 610b4e503c
Rollup merge of #90035 - SparrowLii:rfc2528, r=jackh726
implement rfc-2528 type_changing-struct-update

This PR implement rfc2528-type_changing-struct-update.
The main change process is as follows:
1. Move the processing part of `base_expr` into `check_expr_struct_fields` to avoid returning `remaining_fields` (a relatively complex hash table)
2. Before performing the type consistency check(`check_expr_has_type_or_error`), if the `type_changing_struct_update` feature is set, enter a different processing flow, otherwise keep the original flow
3. In the case of the same structure definition, check each field in `remaining_fields`. If the field in `base_expr` is not the suptype of the field in `adt_ty`, an error(`FeildMisMatch`) will be reported.

The MIR part does not need to be changed, because only the items contained in `remaining_fields` will be extracted from `base_expr` when MIR is generated. This means that fields with different types in `base_expr` will not be used
Updates #86618
cc `@nikomatsakis`
2021-11-09 19:00:41 +01:00
..
dep_graph Address review. 2021-10-20 18:51:15 +02:00
hir Give inline const separate DefKind 2021-11-07 03:59:06 +00:00
infer Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
middle Rollup merge of #89025 - ricobbe:raw-dylib-link-ordinal, r=michaelwoerister 2021-10-07 20:26:11 -07:00
mir Give inline const separate DefKind 2021-11-07 03:59:06 +00:00
query Rename functions reflect that inline const is also "typeck_child" 2021-11-07 04:00:34 +00:00
thir add a CastKind to Node::Cast 2021-09-09 01:32:03 +01:00
traits Point at overlapping impls when type annotations are needed 2021-10-24 18:33:04 +00:00
ty Rollup merge of #90035 - SparrowLii:rfc2528, r=jackh726 2021-11-09 19:00:41 +01:00
util Make panic/assert calls in rustc compatible with Rust 2021. 2021-02-03 22:42:53 +01:00
arena.rs Build jump table at runtime. 2021-10-20 18:32:29 +02:00
lib.rs Revert "Add rustc lint, warning when iterating over hashmaps" 2021-10-28 11:01:42 -04:00
lint.rs Don't abort compilation after giving a lint error 2021-11-08 01:22:28 +00:00
macros.rs Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk 2020-11-17 12:24:34 +00:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs rename mir -> thir around abstract consts 2021-09-09 01:32:03 +01:00