@@ -656,9 +656,9 @@ pub fn imported_types_used_by_exported_interfaces(
656
656
for ( _, export) in resolve. worlds [ world] . exports . iter ( ) {
657
657
match export {
658
658
WorldItem :: Function ( _) => { }
659
- WorldItem :: Interface ( i ) => {
660
- exported_interfaces. insert ( * i ) ;
661
- live_export_types. add_interface ( resolve, * i )
659
+ WorldItem :: Interface { id , .. } => {
660
+ exported_interfaces. insert ( * id ) ;
661
+ live_export_types. add_interface ( resolve, * id )
662
662
}
663
663
WorldItem :: Type ( _) => unreachable ! ( ) ,
664
664
}
@@ -1346,7 +1346,7 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1346
1346
self . resolve
1347
1347
}
1348
1348
1349
- fn anonymous_type_handle ( & mut self , id : TypeId , handle : & Handle , docs : & Docs ) {
1349
+ fn anonymous_type_handle ( & mut self , id : TypeId , handle : & Handle , _docs : & Docs ) {
1350
1350
self . src . h_defs ( "\n typedef " ) ;
1351
1351
let resource = match handle {
1352
1352
Handle :: Borrow ( id) | Handle :: Own ( id) => id,
@@ -1360,7 +1360,7 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1360
1360
self . print_typedef_target ( id) ;
1361
1361
}
1362
1362
1363
- fn anonymous_type_tuple ( & mut self , id : TypeId , ty : & Tuple , docs : & Docs ) {
1363
+ fn anonymous_type_tuple ( & mut self , id : TypeId , ty : & Tuple , _docs : & Docs ) {
1364
1364
self . src . h_defs ( "\n typedef " ) ;
1365
1365
self . src . h_defs ( "struct {\n " ) ;
1366
1366
for ( i, t) in ty. types . iter ( ) . enumerate ( ) {
@@ -1372,7 +1372,7 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1372
1372
self . print_typedef_target ( id) ;
1373
1373
}
1374
1374
1375
- fn anonymous_type_option ( & mut self , id : TypeId , ty : & Type , docs : & Docs ) {
1375
+ fn anonymous_type_option ( & mut self , id : TypeId , ty : & Type , _docs : & Docs ) {
1376
1376
self . src . h_defs ( "\n typedef " ) ;
1377
1377
self . src . h_defs ( "struct {\n " ) ;
1378
1378
self . src . h_defs ( "bool is_some;\n " ) ;
@@ -1383,7 +1383,7 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1383
1383
self . print_typedef_target ( id) ;
1384
1384
}
1385
1385
1386
- fn anonymous_type_result ( & mut self , id : TypeId , ty : & Result_ , docs : & Docs ) {
1386
+ fn anonymous_type_result ( & mut self , id : TypeId , ty : & Result_ , _docs : & Docs ) {
1387
1387
self . src . h_defs ( "\n typedef " ) ;
1388
1388
self . src . h_defs (
1389
1389
"struct {
@@ -1409,7 +1409,7 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1409
1409
self . print_typedef_target ( id) ;
1410
1410
}
1411
1411
1412
- fn anonymous_type_list ( & mut self , id : TypeId , ty : & Type , docs : & Docs ) {
1412
+ fn anonymous_type_list ( & mut self , id : TypeId , ty : & Type , _docs : & Docs ) {
1413
1413
self . src . h_defs ( "\n typedef " ) ;
1414
1414
self . src . h_defs ( "struct {\n " ) ;
1415
1415
let ty = self . gen . type_name ( ty) ;
@@ -1420,15 +1420,15 @@ impl<'a> wit_bindgen_core::AnonymousTypeGenerator<'a> for InterfaceGenerator<'a>
1420
1420
self . print_typedef_target ( id) ;
1421
1421
}
1422
1422
1423
- fn anonymous_type_future ( & mut self , id : TypeId , ty : & Option < Type > , docs : & Docs ) {
1423
+ fn anonymous_type_future ( & mut self , _id : TypeId , _ty : & Option < Type > , _docs : & Docs ) {
1424
1424
todo ! ( "print_anonymous_type for future" ) ;
1425
1425
}
1426
1426
1427
- fn anonymous_type_stream ( & mut self , id : TypeId , ty : & Stream , docs : & Docs ) {
1427
+ fn anonymous_type_stream ( & mut self , _id : TypeId , _ty : & Stream , _docs : & Docs ) {
1428
1428
todo ! ( "print_anonymous_type for stream" ) ;
1429
1429
}
1430
1430
1431
- fn anonymous_typ_type ( & mut self , id : TypeId , ty : & Type , docs : & Docs ) {
1431
+ fn anonymous_typ_type ( & mut self , _id : TypeId , _ty : & Type , _docs : & Docs ) {
1432
1432
todo ! ( "print_anonymous_type for typ" ) ;
1433
1433
}
1434
1434
}
@@ -3098,16 +3098,6 @@ impl Source {
3098
3098
}
3099
3099
}
3100
3100
3101
- trait SourceExt {
3102
- fn as_source ( & mut self ) -> & mut wit_bindgen_core:: Source ;
3103
- }
3104
-
3105
- impl SourceExt for wit_bindgen_core:: Source {
3106
- fn as_source ( & mut self ) -> & mut wit_bindgen_core:: Source {
3107
- self
3108
- }
3109
- }
3110
-
3111
3101
fn wasm_type ( ty : WasmType ) -> & ' static str {
3112
3102
match ty {
3113
3103
WasmType :: I32 => "int32_t" ,
0 commit comments