Skip to content

Trace derive macro fails on some self-referential types #186

Open
@s9ferech

Description

@s9ferech

I have created a test that demonstrates how the Trace derive macro fails on types with a field that depends on a type parameter and also on the newly defined type itself. In this case, the trait resolution runs into a cycle when it tries to derive a trait instance.

If the field was only self-referential but did not include a type parameter then this would work because synstructure would not include the field in the where clause. If it depended on a type parameter but was not self-referential then there would be no cycle. Only in combination do they cause this failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions