Rollup merge of #109716 - scottmcm:field-to-fieldidx, r=oli-obk
Move `mir::Field` → `abi::FieldIdx` The first PR for https://github.com/rust-lang/compiler-team/issues/606 This is just the move-and-rename, because it's plenty big already. Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
This commit is contained in:
commit
85c38454c0
46 changed files with 192 additions and 157 deletions
|
@ -10,7 +10,7 @@ use rustc_middle::mir::*;
|
|||
use rustc_middle::ty::{self, Instance, InstanceDef, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_session::config::OptLevel;
|
||||
use rustc_span::{hygiene::ExpnKind, ExpnData, LocalExpnId, Span};
|
||||
use rustc_target::abi::FIRST_VARIANT;
|
||||
use rustc_target::abi::{FieldIdx, FIRST_VARIANT};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::simplify::{remove_dead_blocks, CfgSimplifier};
|
||||
|
@ -701,7 +701,7 @@ impl<'tcx> Inliner<'tcx> {
|
|||
// The `tmp0`, `tmp1`, and `tmp2` in our example above.
|
||||
let tuple_tmp_args = tuple_tys.iter().enumerate().map(|(i, ty)| {
|
||||
// This is e.g., `tuple_tmp.0` in our example above.
|
||||
let tuple_field = Operand::Move(tcx.mk_place_field(tuple, Field::new(i), ty));
|
||||
let tuple_field = Operand::Move(tcx.mk_place_field(tuple, FieldIdx::new(i), ty));
|
||||
|
||||
// Spill to a local to make e.g., `tmp0`.
|
||||
self.create_temp_if_necessary(tuple_field, callsite, caller_body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue