@@ -805,7 +805,7 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct,
805
805
define_field ! ( ( 'a' as u8 + idx as u8 ) as char , ( '0' as u8 + idx as u8 ) as char , field) ;
806
806
}
807
807
}
808
- _ => unimplemented ! ( )
808
+ syn :: Fields :: Unit => { } ,
809
809
}
810
810
811
811
if all_fields_settable {
@@ -828,7 +828,7 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct,
828
828
types. write_c_type ( w, & field. ty , Some ( & gen_types) , false ) ;
829
829
}
830
830
}
831
- _ => unreachable ! ( )
831
+ syn :: Fields :: Unit => { } ,
832
832
}
833
833
write ! ( w, ") -> {} {{\n \t " , struct_name) . unwrap ( ) ;
834
834
match & s. fields {
@@ -848,7 +848,7 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct,
848
848
}
849
849
}
850
850
} ,
851
- _ => unreachable ! ( )
851
+ syn :: Fields :: Unit => { } ,
852
852
}
853
853
write ! ( w, "{} {{ inner: ObjOps::heap_alloc(" , struct_name) . unwrap ( ) ;
854
854
match & s. fields {
@@ -876,7 +876,7 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct,
876
876
}
877
877
write ! ( w, "\t )" ) . unwrap ( ) ;
878
878
} ,
879
- _ => unreachable ! ( )
879
+ syn :: Fields :: Unit => write ! ( w , "{}::{} {{}}" , types . module_path , struct_name ) . unwrap ( ) ,
880
880
}
881
881
writeln ! ( w, "), is_owned: true }}\n }}" ) . unwrap ( ) ;
882
882
}
0 commit comments