|
1 | | -use rustc_abi::{CanonAbi, Size}; |
| 1 | +use rustc_abi::{CanonAbi, FieldIdx, Size}; |
2 | 2 | use rustc_middle::ty::layout::LayoutOf as _; |
3 | 3 | use rustc_middle::ty::{self, Instance, Ty}; |
4 | 4 | use rustc_span::{BytePos, Loc, Symbol, hygiene}; |
@@ -159,23 +159,23 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { |
159 | 159 | 1 => { |
160 | 160 | this.write_scalar( |
161 | 161 | Scalar::from_target_usize(name.len().to_u64(), this), |
162 | | - &this.project_field(dest, 0)?, |
| 162 | + &this.project_field(dest, FieldIdx::from_u32(0))?, |
163 | 163 | )?; |
164 | 164 | this.write_scalar( |
165 | 165 | Scalar::from_target_usize(filename.len().to_u64(), this), |
166 | | - &this.project_field(dest, 1)?, |
| 166 | + &this.project_field(dest, FieldIdx::from_u32(1))?, |
167 | 167 | )?; |
168 | 168 | } |
169 | 169 | _ => throw_unsup_format!("unknown `miri_resolve_frame` flags {}", flags), |
170 | 170 | } |
171 | 171 |
|
172 | | - this.write_scalar(Scalar::from_u32(lineno), &this.project_field(dest, 2)?)?; |
173 | | - this.write_scalar(Scalar::from_u32(colno), &this.project_field(dest, 3)?)?; |
| 172 | + this.write_scalar(Scalar::from_u32(lineno), &this.project_field(dest, FieldIdx::from_u32(2))?)?; |
| 173 | + this.write_scalar(Scalar::from_u32(colno), &this.project_field(dest, FieldIdx::from_u32(3))?)?; |
174 | 174 |
|
175 | 175 | // Support a 4-field struct for now - this is deprecated |
176 | 176 | // and slated for removal. |
177 | 177 | if num_fields == 5 { |
178 | | - this.write_pointer(fn_ptr, &this.project_field(dest, 4)?)?; |
| 178 | + this.write_pointer(fn_ptr, &this.project_field(dest, FieldIdx::from_u32(4))?)?; |
179 | 179 | } |
180 | 180 |
|
181 | 181 | interp_ok(()) |
|
0 commit comments