Closed dgherzka closed 7 months ago
It wasn't clear to me whether this should be implemented as a new CastKind (BooleanToFloating) or treated as a special case of IntegralToFloating.
Hi @kkysen, pinging you because I see that you are a major contributor to this project. I apologize if you aren't the right person to talk to. What's the process for getting this reviewed? Thanks in advance!
Sorry for continuing to tag people, I just want to try one more time. @spernsteiner are you the right person to talk to? Please let me know if I should just abandon this.
Hi @dgherzka! Sorry for taking a while to review this; I saw your ping but forgot to take a look. I'll review it now, and your other PRs and issues.
Previously, C code that cast
bool
s to floating types, like thiswould try to do so directly in Rust, like this
which isn't allowed, resulting in errors like this
This fixes things by emitting this Rust instead by casting through the integral type
u8
: