@@ -1506,8 +1506,8 @@ pub enum Type {
15061506 /// extern "ABI" fn
15071507 BareFunction ( Box < BareFunctionDecl > ) ,
15081508 Tuple ( Vec < Type > ) ,
1509- Vector ( Box < Type > ) ,
1510- FixedVector ( Box < Type > , String ) ,
1509+ Slice ( Box < Type > ) ,
1510+ Array ( Box < Type > , usize ) ,
15111511 Never ,
15121512 Unique ( Box < Type > ) ,
15131513 RawPointer ( Mutability , Box < Type > ) ,
@@ -1573,10 +1573,8 @@ impl Type {
15731573 pub fn primitive_type ( & self ) -> Option < PrimitiveType > {
15741574 match * self {
15751575 Primitive ( p) | BorrowedRef { type_ : box Primitive ( p) , ..} => Some ( p) ,
1576- Vector ( ..) | BorrowedRef { type_ : box Vector ( ..) , .. } => Some ( PrimitiveType :: Slice ) ,
1577- FixedVector ( ..) | BorrowedRef { type_ : box FixedVector ( ..) , .. } => {
1578- Some ( PrimitiveType :: Array )
1579- }
1576+ Slice ( ..) | BorrowedRef { type_ : box Slice ( ..) , .. } => Some ( PrimitiveType :: Slice ) ,
1577+ Array ( ..) | BorrowedRef { type_ : box Array ( ..) , .. } => Some ( PrimitiveType :: Array ) ,
15801578 Tuple ( ..) => Some ( PrimitiveType :: Tuple ) ,
15811579 RawPointer ( ..) => Some ( PrimitiveType :: RawPointer ) ,
15821580 _ => None ,
@@ -1717,11 +1715,11 @@ impl Clean<Type> for hir::Ty {
17171715 BorrowedRef { lifetime : lifetime, mutability : m. mutbl . clean ( cx) ,
17181716 type_ : box m. ty . clean ( cx) }
17191717 }
1720- TySlice ( ref ty) => Vector ( box ty. clean ( cx) ) ,
1718+ TySlice ( ref ty) => Slice ( box ty. clean ( cx) ) ,
17211719 TyArray ( ref ty, length) => {
17221720 use rustc:: middle:: const_val:: eval_length;
17231721 let n = eval_length ( cx. tcx , length, "array length" ) . unwrap ( ) ;
1724- FixedVector ( box ty. clean ( cx) , n. to_string ( ) )
1722+ Array ( box ty. clean ( cx) , n)
17251723 } ,
17261724 TyTup ( ref tys) => Tuple ( tys. clean ( cx) ) ,
17271725 TyPath ( hir:: QPath :: Resolved ( None , ref path) ) => {
@@ -1832,9 +1830,8 @@ impl<'tcx> Clean<Type> for ty::Ty<'tcx> {
18321830 ty:: TyUint ( uint_ty) => Primitive ( uint_ty. into ( ) ) ,
18331831 ty:: TyFloat ( float_ty) => Primitive ( float_ty. into ( ) ) ,
18341832 ty:: TyStr => Primitive ( PrimitiveType :: Str ) ,
1835- ty:: TySlice ( ty) => Vector ( box ty. clean ( cx) ) ,
1836- ty:: TyArray ( ty, i) => FixedVector ( box ty. clean ( cx) ,
1837- format ! ( "{}" , i) ) ,
1833+ ty:: TySlice ( ty) => Slice ( box ty. clean ( cx) ) ,
1834+ ty:: TyArray ( ty, n) => Array ( box ty. clean ( cx) , n) ,
18381835 ty:: TyRawPtr ( mt) => RawPointer ( mt. mutbl . clean ( cx) , box mt. ty . clean ( cx) ) ,
18391836 ty:: TyRef ( r, mt) => BorrowedRef {
18401837 lifetime : r. clean ( cx) ,
0 commit comments