@@ -1135,13 +1135,10 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
11351135 format ! ( "{}" , def. variants[ variant_index] . fields[ field_index] . name) ,
11361136 ProjectionElem :: Field ( _, field_type) =>
11371137 self . describe_field_from_ty ( & field_type, field_index) ,
1138- ProjectionElem :: Index ( ..) | ProjectionElem :: ConstantIndex { .. } =>
1138+ ProjectionElem :: Index ( ..)
1139+ | ProjectionElem :: ConstantIndex { .. }
1140+ | ProjectionElem :: Subslice { .. } =>
11391141 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- }
11451142 }
11461143 }
11471144 }
@@ -1169,7 +1166,7 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
11691166 ty:: TyRef ( _, tnm) | ty:: TyRawPtr ( tnm) => {
11701167 self . describe_field_from_ty ( & tnm. ty , field_index)
11711168 } ,
1172- ty:: TyArray ( ty, _) => {
1169+ ty:: TyArray ( ty, _) | ty :: TySlice ( ty ) => {
11731170 self . describe_field_from_ty ( & ty, field_index)
11741171 }
11751172 _ => {
0 commit comments