diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-09 19:00:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-09 19:00:41 +0100 |
| commit | 610b4e503ccc5cb6d4ef98bb5016ba42eaf94522 (patch) | |
| tree | c8db226e573691cc2ffcd379127dc226d48bd564 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp | |
| parent | fd74c93403c455187c343f3828274824addc9881 (diff) | |
| parent | 926892ddc0b75b50f5d0a3483d829e501aa8e895 (diff) | |
| download | rust-610b4e503ccc5cb6d4ef98bb5016ba42eaf94522.tar.gz rust-610b4e503ccc5cb6d4ef98bb5016ba42eaf94522.zip | |
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`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
