c2rust icon indicating copy to clipboard operation
c2rust copied to clipboard

transpile: Init list not implemented for Uint

Open spernsteiner opened this issue 2 years ago • 1 comments

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.

spernsteiner avatar Jul 28 '23 21:07 spernsteiner

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

kkysen avatar Jul 28 '23 22:07 kkysen