Closed aneksteind closed 1 year ago
@spernsteiner would you mind taking another look at this?
I think ideally we would be able to either insert additional lifetime arguments before/after some existing argument (<T>
-> <'h0, T>
or <'a>
-> <'a, 'h0>
, with the rewrite being placed on a zero-width span <{}T>
or <'a{}>
) or generate a whole generics list from scratch if none is present (Foo
-> Foo<'h0>
, again attaching the rewrite to a zero-width span Foo{}
). This would minimize disruption of the existing source code. But it might be better to just add a TODO
or open an issue to avoid this complexity for now.
Rewrites structs to reflect hypothetical lifetimes accepted by polonius.
e.g.
gets rewritten to