@@ -170,6 +170,9 @@ pub trait InterfaceGenerator<'a> {
170170 fn type_alias ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) ;
171171 fn type_list ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) ;
172172 fn type_builtin ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) ;
173+ fn type_future ( & mut self , id : TypeId , name : & str , ty : & Option < Type > , docs : & Docs ) ;
174+ fn type_stream ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) ;
175+ fn type_error_context ( & mut self , id : TypeId , name : & str , docs : & Docs ) ;
173176 fn types ( & mut self , iface : InterfaceId ) {
174177 let iface = & self . resolve ( ) . interfaces [ iface] ;
175178 for ( name, id) in iface. types . iter ( ) {
@@ -190,12 +193,10 @@ pub trait InterfaceGenerator<'a> {
190193 TypeDefKind :: Result ( r) => self . type_result ( id, name, r, & ty. docs ) ,
191194 TypeDefKind :: List ( t) => self . type_list ( id, name, t, & ty. docs ) ,
192195 TypeDefKind :: Type ( t) => self . type_alias ( id, name, t, & ty. docs ) ,
193- TypeDefKind :: Future ( _ ) => panic ! ( "future types do not require definition" ) ,
194- TypeDefKind :: Stream ( _ ) => panic ! ( "stream types do not require definition" ) ,
196+ TypeDefKind :: Future ( t ) => self . type_future ( id , name , t , & ty . docs ) ,
197+ TypeDefKind :: Stream ( t ) => self . type_stream ( id , name , t , & ty . docs ) ,
195198 TypeDefKind :: Handle ( _) => panic ! ( "handle types do not require definition" ) ,
196- TypeDefKind :: ErrorContext => {
197- panic ! ( "the error-context type does not require definition" )
198- }
199+ TypeDefKind :: ErrorContext => self . type_error_context ( id, name, & ty. docs ) ,
199200 TypeDefKind :: Unknown => unreachable ! ( ) ,
200201 }
201202 }
0 commit comments