immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.95k stars 234 forks source link

Add hypothetical lifetime to structure rewrites with empty generic type parameter lists #956

Closed aneksteind closed 1 year ago

aneksteind commented 1 year ago

Deconstructing an HIR field type would fail in the case where there where the field type had no generic parameters, in that it would not be rewritten to include the new hypothetical lifetimes. Now the type is deconstructed correctly by providing an empty generic type parameter list, which allows the hir_args to have the correct value and allows adt_ty_rw to run and generate a rewrite for the ADT