@@ -571,6 +571,7 @@ impl C {
571571 dst. push_str ( "string_t" ) ;
572572 self . needs_string = true ;
573573 }
574+ Type :: ErrorContext => todo ! ( "C error context type name" ) ,
574575 Type :: Id ( id) => {
575576 if let Some ( name) = self . type_names . get ( id) {
576577 dst. push_str ( name) ;
@@ -718,7 +719,6 @@ fn is_prim_type_id(resolve: &Resolve, id: TypeId) -> bool {
718719 | TypeDefKind :: Result ( _)
719720 | TypeDefKind :: Future ( _)
720721 | TypeDefKind :: Stream ( _)
721- | TypeDefKind :: ErrorContext
722722 | TypeDefKind :: Unknown => false ,
723723 }
724724}
@@ -738,6 +738,7 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) {
738738 Type :: F32 => src. push_str ( "f32" ) ,
739739 Type :: F64 => src. push_str ( "f64" ) ,
740740 Type :: String => src. push_str ( "string" ) ,
741+ Type :: ErrorContext => todo ! ( ) ,
741742 Type :: Id ( id) => {
742743 let ty = & resolve. types [ * id] ;
743744 if let Some ( name) = & ty. name {
@@ -782,7 +783,6 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) {
782783 }
783784 TypeDefKind :: Future ( _) => todo ! ( ) ,
784785 TypeDefKind :: Stream ( _) => todo ! ( ) ,
785- TypeDefKind :: ErrorContext => todo ! ( ) ,
786786 TypeDefKind :: Handle ( Handle :: Own ( resource) ) => {
787787 src. push_str ( "own_" ) ;
788788 push_ty_name ( resolve, & Type :: Id ( * resource) , src) ;
@@ -951,6 +951,7 @@ impl Return {
951951 self . retptrs . push ( * orig_ty) ;
952952 return ;
953953 }
954+ Type :: ErrorContext => todo ! ( "return_single for error-context" ) ,
954955 _ => {
955956 self . scalar = Some ( Scalar :: Type ( * orig_ty) ) ;
956957 return ;
@@ -999,7 +1000,6 @@ impl Return {
9991000
10001001 TypeDefKind :: Future ( _) => todo ! ( "return_single for future" ) ,
10011002 TypeDefKind :: Stream ( _) => todo ! ( "return_single for stream" ) ,
1002- TypeDefKind :: ErrorContext => todo ! ( "return_single for error-context" ) ,
10031003 TypeDefKind :: Resource => todo ! ( "return_single for resource" ) ,
10041004 TypeDefKind :: Unknown => unreachable ! ( ) ,
10051005 }
@@ -1357,11 +1357,6 @@ void __wasm_export_{ns}_{snake}_dtor({ns}_{snake}_t* arg) {{
13571357 todo ! ( )
13581358 }
13591359
1360- fn type_error_context ( & mut self , id : TypeId , name : & str , docs : & Docs ) {
1361- _ = ( id, name, docs) ;
1362- todo ! ( )
1363- }
1364-
13651360 fn type_builtin ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) {
13661361 let _ = ( id, name, ty, docs) ;
13671362 }
@@ -1454,10 +1449,6 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
14541449 todo ! ( "print_anonymous_type for stream" ) ;
14551450 }
14561451
1457- fn anonymous_type_error_context ( & mut self ) {
1458- todo ! ( "print_anonymous_type for error-context" ) ;
1459- }
1460-
14611452 fn anonymous_type_type ( & mut self , _id : TypeId , _ty : & Type , _docs : & Docs ) {
14621453 todo ! ( "print_anonymous_type for type" ) ;
14631454 }
@@ -1632,7 +1623,6 @@ impl InterfaceGenerator<'_> {
16321623 }
16331624 TypeDefKind :: Future ( _) => todo ! ( "print_dtor for future" ) ,
16341625 TypeDefKind :: Stream ( _) => todo ! ( "print_dtor for stream" ) ,
1635- TypeDefKind :: ErrorContext => todo ! ( "print_dtor for error-context" ) ,
16361626 TypeDefKind :: Resource => { }
16371627 TypeDefKind :: Handle ( Handle :: Borrow ( id) | Handle :: Own ( id) ) => {
16381628 self . free ( & Type :: Id ( * id) , "*ptr" ) ;
@@ -1672,6 +1662,7 @@ impl InterfaceGenerator<'_> {
16721662 | Type :: F32
16731663 | Type :: F64
16741664 | Type :: Char => { }
1665+ Type :: ErrorContext => todo ! ( "error context free" ) ,
16751666 }
16761667 }
16771668
@@ -2101,9 +2092,7 @@ impl InterfaceGenerator<'_> {
21012092
21022093 TypeDefKind :: List ( ty) => self . contains_droppable_borrow ( ty) ,
21032094
2104- TypeDefKind :: Future ( _) | TypeDefKind :: Stream ( _) | TypeDefKind :: ErrorContext => {
2105- false
2106- }
2095+ TypeDefKind :: Future ( _) | TypeDefKind :: Stream ( _) => false ,
21072096
21082097 TypeDefKind :: Type ( ty) => self . contains_droppable_borrow ( ty) ,
21092098
@@ -3166,7 +3155,6 @@ pub fn is_arg_by_pointer(resolve: &Resolve, ty: &Type) -> bool {
31663155 TypeDefKind :: Tuple ( _) | TypeDefKind :: Record ( _) | TypeDefKind :: List ( _) => true ,
31673156 TypeDefKind :: Future ( _) => todo ! ( "is_arg_by_pointer for future" ) ,
31683157 TypeDefKind :: Stream ( _) => todo ! ( "is_arg_by_pointer for stream" ) ,
3169- TypeDefKind :: ErrorContext => todo ! ( "is_arg_by_pointer for error-context" ) ,
31703158 TypeDefKind :: Resource => todo ! ( "is_arg_by_pointer for resource" ) ,
31713159 TypeDefKind :: Unknown => unreachable ! ( ) ,
31723160 } ,
0 commit comments