@@ -1135,13 +1135,10 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
1135
1135
format ! ( "{}" , def. variants[ variant_index] . fields[ field_index] . name) ,
1136
1136
ProjectionElem :: Field ( _, field_type) =>
1137
1137
self . describe_field_from_ty ( & field_type, field_index) ,
1138
- ProjectionElem :: Index ( ..) | ProjectionElem :: ConstantIndex { .. } =>
1138
+ ProjectionElem :: Index ( ..)
1139
+ | ProjectionElem :: ConstantIndex { .. }
1140
+ | ProjectionElem :: Subslice { .. } =>
1139
1141
format ! ( "{}" , self . describe_field( & proj. base, field_index) ) ,
1140
- ProjectionElem :: Subslice { .. } => {
1141
- debug ! ( "End-user description not implemented for field of projection {:?}" ,
1142
- proj) ;
1143
- format ! ( "<subslice>{}" , field_index)
1144
- }
1145
1142
}
1146
1143
}
1147
1144
}
@@ -1169,7 +1166,7 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
1169
1166
ty:: TyRef ( _, tnm) | ty:: TyRawPtr ( tnm) => {
1170
1167
self . describe_field_from_ty ( & tnm. ty , field_index)
1171
1168
} ,
1172
- ty:: TyArray ( ty, _) => {
1169
+ ty:: TyArray ( ty, _) | ty :: TySlice ( ty ) => {
1173
1170
self . describe_field_from_ty ( & ty, field_index)
1174
1171
}
1175
1172
_ => {
0 commit comments