diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-03-29 21:19:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-29 21:19:51 +0200 |
| commit | 85c38454c0044d727e68cc123ff93376da62abfc (patch) | |
| tree | e5c066cb2f0db3ce000128fd99af6f28564cd632 /compiler/rustc_codegen_ssa | |
| parent | 5937ec1915c09f6891825f393bc6d0e592a1d511 (diff) | |
| parent | 5bbaeadc013cae79e440fb5d3da2175c83cb36e4 (diff) | |
| download | rust-85c38454c0044d727e68cc123ff93376da62abfc.tar.gz rust-85c38454c0044d727e68cc123ff93376da62abfc.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/debuginfo.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs index d15774696a5..ff25d1e3823 100644 --- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs +++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs @@ -8,7 +8,7 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf}; use rustc_session::config::DebugInfo; use rustc_span::symbol::{kw, Symbol}; use rustc_span::{BytePos, Span}; -use rustc_target::abi::{Abi, Size, VariantIdx}; +use rustc_target::abi::{Abi, FieldIdx, Size, VariantIdx}; use super::operand::{OperandRef, OperandValue}; use super::place::PlaceRef; @@ -79,7 +79,7 @@ impl<'tcx, S: Copy, L: Copy> DebugScope<S, L> { trait DebugInfoOffsetLocation<'tcx, Bx> { fn deref(&self, bx: &mut Bx) -> Self; fn layout(&self) -> TyAndLayout<'tcx>; - fn project_field(&self, bx: &mut Bx, field: mir::Field) -> Self; + fn project_field(&self, bx: &mut Bx, field: FieldIdx) -> Self; fn downcast(&self, bx: &mut Bx, variant: VariantIdx) -> Self; } @@ -94,7 +94,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> DebugInfoOffsetLocation<'tcx, Bx> self.layout } - fn project_field(&self, bx: &mut Bx, field: mir::Field) -> Self { + fn project_field(&self, bx: &mut Bx, field: FieldIdx) -> Self { PlaceRef::project_field(*self, bx, field.index()) } @@ -116,7 +116,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> DebugInfoOffsetLocation<'tcx, Bx> *self } - fn project_field(&self, bx: &mut Bx, field: mir::Field) -> Self { + fn project_field(&self, bx: &mut Bx, field: FieldIdx) -> Self { self.field(bx.cx(), field.index()) } |
