@@ -571,6 +571,7 @@ impl C {
571
571
dst. push_str ( "string_t" ) ;
572
572
self . needs_string = true ;
573
573
}
574
+ Type :: ErrorContext => todo ! ( "C error context type name" ) ,
574
575
Type :: Id ( id) => {
575
576
if let Some ( name) = self . type_names . get ( id) {
576
577
dst. push_str ( name) ;
@@ -718,7 +719,6 @@ fn is_prim_type_id(resolve: &Resolve, id: TypeId) -> bool {
718
719
| TypeDefKind :: Result ( _)
719
720
| TypeDefKind :: Future ( _)
720
721
| TypeDefKind :: Stream ( _)
721
- | TypeDefKind :: ErrorContext
722
722
| TypeDefKind :: Unknown => false ,
723
723
}
724
724
}
@@ -738,6 +738,7 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) {
738
738
Type :: F32 => src. push_str ( "f32" ) ,
739
739
Type :: F64 => src. push_str ( "f64" ) ,
740
740
Type :: String => src. push_str ( "string" ) ,
741
+ Type :: ErrorContext => todo ! ( ) ,
741
742
Type :: Id ( id) => {
742
743
let ty = & resolve. types [ * id] ;
743
744
if let Some ( name) = & ty. name {
@@ -782,7 +783,6 @@ pub fn push_ty_name(resolve: &Resolve, ty: &Type, src: &mut String) {
782
783
}
783
784
TypeDefKind :: Future ( _) => todo ! ( ) ,
784
785
TypeDefKind :: Stream ( _) => todo ! ( ) ,
785
- TypeDefKind :: ErrorContext => todo ! ( ) ,
786
786
TypeDefKind :: Handle ( Handle :: Own ( resource) ) => {
787
787
src. push_str ( "own_" ) ;
788
788
push_ty_name ( resolve, & Type :: Id ( * resource) , src) ;
@@ -951,6 +951,7 @@ impl Return {
951
951
self . retptrs . push ( * orig_ty) ;
952
952
return ;
953
953
}
954
+ Type :: ErrorContext => todo ! ( "return_single for error-context" ) ,
954
955
_ => {
955
956
self . scalar = Some ( Scalar :: Type ( * orig_ty) ) ;
956
957
return ;
@@ -999,7 +1000,6 @@ impl Return {
999
1000
1000
1001
TypeDefKind :: Future ( _) => todo ! ( "return_single for future" ) ,
1001
1002
TypeDefKind :: Stream ( _) => todo ! ( "return_single for stream" ) ,
1002
- TypeDefKind :: ErrorContext => todo ! ( "return_single for error-context" ) ,
1003
1003
TypeDefKind :: Resource => todo ! ( "return_single for resource" ) ,
1004
1004
TypeDefKind :: Unknown => unreachable ! ( ) ,
1005
1005
}
@@ -1357,11 +1357,6 @@ void __wasm_export_{ns}_{snake}_dtor({ns}_{snake}_t* arg) {{
1357
1357
todo ! ( )
1358
1358
}
1359
1359
1360
- fn type_error_context ( & mut self , id : TypeId , name : & str , docs : & Docs ) {
1361
- _ = ( id, name, docs) ;
1362
- todo ! ( )
1363
- }
1364
-
1365
1360
fn type_builtin ( & mut self , id : TypeId , name : & str , ty : & Type , docs : & Docs ) {
1366
1361
let _ = ( id, name, ty, docs) ;
1367
1362
}
@@ -1454,10 +1449,6 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1454
1449
todo ! ( "print_anonymous_type for stream" ) ;
1455
1450
}
1456
1451
1457
- fn anonymous_type_error_context ( & mut self ) {
1458
- todo ! ( "print_anonymous_type for error-context" ) ;
1459
- }
1460
-
1461
1452
fn anonymous_type_type ( & mut self , _id : TypeId , _ty : & Type , _docs : & Docs ) {
1462
1453
todo ! ( "print_anonymous_type for type" ) ;
1463
1454
}
@@ -1632,7 +1623,6 @@ impl InterfaceGenerator<'_> {
1632
1623
}
1633
1624
TypeDefKind :: Future ( _) => todo ! ( "print_dtor for future" ) ,
1634
1625
TypeDefKind :: Stream ( _) => todo ! ( "print_dtor for stream" ) ,
1635
- TypeDefKind :: ErrorContext => todo ! ( "print_dtor for error-context" ) ,
1636
1626
TypeDefKind :: Resource => { }
1637
1627
TypeDefKind :: Handle ( Handle :: Borrow ( id) | Handle :: Own ( id) ) => {
1638
1628
self . free ( & Type :: Id ( * id) , "*ptr" ) ;
@@ -1672,6 +1662,7 @@ impl InterfaceGenerator<'_> {
1672
1662
| Type :: F32
1673
1663
| Type :: F64
1674
1664
| Type :: Char => { }
1665
+ Type :: ErrorContext => todo ! ( "error context free" ) ,
1675
1666
}
1676
1667
}
1677
1668
@@ -2101,9 +2092,7 @@ impl InterfaceGenerator<'_> {
2101
2092
2102
2093
TypeDefKind :: List ( ty) => self . contains_droppable_borrow ( ty) ,
2103
2094
2104
- TypeDefKind :: Future ( _) | TypeDefKind :: Stream ( _) | TypeDefKind :: ErrorContext => {
2105
- false
2106
- }
2095
+ TypeDefKind :: Future ( _) | TypeDefKind :: Stream ( _) => false ,
2107
2096
2108
2097
TypeDefKind :: Type ( ty) => self . contains_droppable_borrow ( ty) ,
2109
2098
@@ -3166,7 +3155,6 @@ pub fn is_arg_by_pointer(resolve: &Resolve, ty: &Type) -> bool {
3166
3155
TypeDefKind :: Tuple ( _) | TypeDefKind :: Record ( _) | TypeDefKind :: List ( _) => true ,
3167
3156
TypeDefKind :: Future ( _) => todo ! ( "is_arg_by_pointer for future" ) ,
3168
3157
TypeDefKind :: Stream ( _) => todo ! ( "is_arg_by_pointer for stream" ) ,
3169
- TypeDefKind :: ErrorContext => todo ! ( "is_arg_by_pointer for error-context" ) ,
3170
3158
TypeDefKind :: Resource => todo ! ( "is_arg_by_pointer for resource" ) ,
3171
3159
TypeDefKind :: Unknown => unreachable ! ( ) ,
3172
3160
} ,
0 commit comments