Update for changes in rustc.
This commit is contained in:
parent
b2b814177a
commit
9a7f76889a
@ -744,7 +744,7 @@ pub fn get_field_ty(&self, ty: Ty<'tcx>, field_index: usize) -> EvalResult<'tcx,
|
||||
Ok(adt_def.struct_variant().fields[field_index].ty(self.tcx, substs))
|
||||
}
|
||||
|
||||
ty::TyTuple(fields) => Ok(fields[field_index]),
|
||||
ty::TyTuple(fields, _) => Ok(fields[field_index]),
|
||||
|
||||
ty::TyRef(_, ref tam) |
|
||||
ty::TyRawPtr(ref tam) => self.get_fat_field(tam.ty, field_index),
|
||||
|
@ -520,7 +520,7 @@ fn unpack_fn_args(&self, args: &mut Vec<(Value, Ty<'tcx>)>) -> EvalResult<'tcx>
|
||||
if let Some((last, last_ty)) = args.pop() {
|
||||
let last_layout = self.type_layout(last_ty)?;
|
||||
match (&last_ty.sty, last_layout) {
|
||||
(&ty::TyTuple(fields),
|
||||
(&ty::TyTuple(fields, _),
|
||||
&Layout::Univariant { ref variant, .. }) => {
|
||||
let offsets = variant.offsets.iter().map(|s| s.bytes());
|
||||
let last_ptr = match last {
|
||||
@ -785,7 +785,7 @@ pub fn drop(
|
||||
drop,
|
||||
)?;
|
||||
},
|
||||
ty::TyTuple(fields) => {
|
||||
ty::TyTuple(fields, _) => {
|
||||
let offsets = match *self.type_layout(ty)? {
|
||||
Layout::Univariant { ref variant, .. } => &variant.offsets,
|
||||
_ => bug!("tuples must be univariant"),
|
||||
|
Loading…
Reference in New Issue
Block a user