Skip to content

Commit 258c064

Browse files
committed
Drop spurious restriction on generics in tuple struct fields
There's no need for this assertion, the code should be the same between named fields and tuple fields.
1 parent 84b4a56 commit 258c064

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

c-bindings-gen/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,6 @@ fn writeln_struct<'a, 'b, W: std::io::Write>(w: &mut W, s: &'a syn::ItemStruct,
981981
write!(w, "\t}}").unwrap();
982982
},
983983
syn::Fields::Unnamed(fields) => {
984-
assert!(!s.generics.params.iter()
985-
.any(|gen| if let syn::GenericParam::Lifetime(_) = gen { false } else { true }));
986984
writeln!(w, "{} (", types.maybe_resolve_ident(&s.ident).unwrap()).unwrap();
987985
for (idx, field) in fields.unnamed.iter().enumerate() {
988986
write!(w, "\t\t").unwrap();

0 commit comments

Comments
 (0)