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-and-bitrotty already. Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
This commit is contained in:
parent
acd27bb557
commit
5bbaeadc01
46 changed files with 192 additions and 157 deletions
|
@ -40,7 +40,7 @@ use rustc_index::vec::IndexVec;
|
|||
use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_target::abi::VariantIdx;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
|
||||
use crate::lattice::{HasBottom, HasTop};
|
||||
use crate::{
|
||||
|
@ -919,7 +919,7 @@ impl<V: HasTop> ValueOrPlace<V> {
|
|||
/// Although only field projections are currently allowed, this could change in the future.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum TrackElem {
|
||||
Field(Field),
|
||||
Field(FieldIdx),
|
||||
Variant(VariantIdx),
|
||||
Discriminant,
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ pub fn iter_fields<'tcx>(
|
|||
ty: Ty<'tcx>,
|
||||
tcx: TyCtxt<'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
mut f: impl FnMut(Option<VariantIdx>, Field, Ty<'tcx>),
|
||||
mut f: impl FnMut(Option<VariantIdx>, FieldIdx, Ty<'tcx>),
|
||||
) {
|
||||
match ty.kind() {
|
||||
ty::Tuple(list) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue