Skip to content

Do not generate names for typedefed anonymous structs and enums #427

Closed
@jethrogb

Description

@jethrogb

A common pattern in a lot of C code is to do

typedef struct /* no name here */ {
    // ...
} my_struct;

bindgen 0.20 translates this using a made-up type name and a re-export. This makes the rustdoc documentation look awful (and potentially error messages as well). These bogus type names were not introduced in bindgen 0.19. I think there is no reason not to detect this common pattern and avoid them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions