@@ -830,7 +830,7 @@ impl<'a, 'tcx: 'a, 'arena> Interpreter<'a, 'tcx, 'arena> {
830
830
831
831
Index ( ref operand) => {
832
832
let elem_size = match base_ty. sty {
833
- ty:: TyArray ( elem_ty, _) => self . type_size ( elem_ty ) ,
833
+ ty:: TyArray ( elem_ty, _) |
834
834
ty:: TySlice ( elem_ty) => self . type_size ( elem_ty) ,
835
835
_ => panic ! ( "indexing expected an array or slice, got {:?}" , base_ty) ,
836
836
} ;
@@ -1109,11 +1109,9 @@ impl<'a, 'tcx: 'a, 'arena> Interpreter<'a, 'tcx, 'arena> {
1109
1109
let vtable = selection. map ( |predicate| {
1110
1110
fulfill_cx. register_predicate_obligation ( & infcx, predicate) ;
1111
1111
} ) ;
1112
- let vtable = infer:: drain_fulfillment_cx_or_panic (
1112
+ infer:: drain_fulfillment_cx_or_panic (
1113
1113
DUMMY_SP , & infcx, & mut fulfill_cx, & vtable
1114
- ) ;
1115
-
1116
- vtable
1114
+ )
1117
1115
}
1118
1116
1119
1117
/// Trait method, which has to be resolved to an impl method.
@@ -1166,7 +1164,7 @@ impl<'a, 'tcx: 'a, 'arena> Interpreter<'a, 'tcx, 'arena> {
1166
1164
}
1167
1165
}
1168
1166
1169
- fn pointee_type < ' tcx > ( ptr_ty : ty:: Ty < ' tcx > ) -> Option < ty:: Ty < ' tcx > > {
1167
+ fn pointee_type ( ptr_ty : ty:: Ty ) -> Option < ty:: Ty > {
1170
1168
match ptr_ty. sty {
1171
1169
ty:: TyRef ( _, ty:: TypeAndMut { ty, .. } ) |
1172
1170
ty:: TyRawPtr ( ty:: TypeAndMut { ty, .. } ) |
0 commit comments