Skip to content

0i32 != 0 vs false #190

@samuela

Description

@samuela

I'm looking through the c2rust translation of a bit of C code and I'm seeing statements like

bool nonempty = false;

translated into

let mut nonempty: bool = 0i32 != 0;

which seems like a pretty roundabout way to simply say false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    readabilityGenerated code is hard to read and can be simplified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions