immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

transpile: Init list not implemented for Uint #1009

Closed spernsteiner closed 3 months ago

spernsteiner commented 11 months ago
int f() {
    unsigned x = { 1 };
    return x;
}

int g() {
    int x = { 1 };
    return x;
}

Translation of g succeeds. Translation of f fails, complaining "Init list not implemented for Uint", and f is omitted from the generated Rust code.

kkysen commented 11 months ago

I think the fix to support any scalar type should be pretty trivial.