gccrs
gccrs copied to clipboard
Mutally recursive types are not resolved in TyTy
struct S(&'static T);
struct T(&'static S);
./lifetime.rs:32:19: error: failed to resolve root segment
32 | struct S(&'static T);
| ^
Maybe related to #2733
Yeah i haven't done recursive types I've got two ideas how to solve it and I can't decide whats the right way to do it.
Off the top of my head other front-ends in GCC detect the recusive case and do a check that yes its recursive but enforce it can only be a pointer type of some kind but i am not sure if this is the correct rust semantics.