Skip to content

Incorrect query of whether given comp type is an union in analyses #1070

Open
@pepyakin

Description

@pepyakin

Analyses like derive_partial_eq_or_partial_ord assumes that if some Comp type is an union and rust target version allows us to use untagged union feature, then that Comp type will be emitted as a rust untagged union.
 
However, this can be not true, because in codegen we still can decide to emit bindgen union instead of rust union.
 
This header should reproduce the case
 

union U4 {
    unsigned derp : 1;
};

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