@@ -659,6 +659,8 @@ pub enum DefinedType {
659659 Tuple ( Vec < ValueType > ) ,
660660 /// A list type.
661661 List ( ValueType ) ,
662+ /// A fixed size array
663+ FixedSizeList ( ValueType , u32 ) ,
662664 /// An option type.
663665 Option ( ValueType ) ,
664666 /// A result type.
@@ -689,7 +691,7 @@ impl DefinedType {
689691 pub fn contains_borrow ( & self , types : & Types ) -> bool {
690692 match self {
691693 Self :: Tuple ( tys) => tys. iter ( ) . any ( |ty| ty. contains_borrow ( types) ) ,
692- Self :: List ( ty) => ty. contains_borrow ( types) ,
694+ Self :: List ( ty) | Self :: FixedSizeList ( ty , _ ) => ty. contains_borrow ( types) ,
693695 Self :: Option ( ty) => ty. contains_borrow ( types) ,
694696 Self :: Result { ok, err } => {
695697 ok. map ( |ty| ty. contains_borrow ( types) ) . unwrap_or ( false )
@@ -721,7 +723,7 @@ impl DefinedType {
721723
722724 Ok ( ( ) )
723725 }
724- DefinedType :: List ( ty) | DefinedType :: Option ( ty) => {
726+ DefinedType :: List ( ty) | DefinedType :: Option ( ty) | DefinedType :: FixedSizeList ( ty , _ ) => {
725727 ty. _visit_defined_types ( types, visitor, false )
726728 }
727729 DefinedType :: Result { ok, err } => {
@@ -765,6 +767,7 @@ impl DefinedType {
765767 match self {
766768 Self :: Tuple ( _) => "tuple" ,
767769 Self :: List ( _) => "list" ,
770+ Self :: FixedSizeList ( _, _) => "list<,N>" ,
768771 Self :: Option ( _) => "option" ,
769772 Self :: Result { .. } => "result" ,
770773 Self :: Variant ( _) => "variant" ,
0 commit comments