5 ms·
We'd like that too; it's likely to fall out of const generics, which are looking likely to hit stable sometime early next year.
by steveklabnik 8y ago
We'd like that too; it's likely to fall out of const generics, which are looking likely to hit stable sometime early next year.
- henrikeh 8y agoWith const generics ranged integers would be implemented as a user specified check. How viable would it be to implement an optimization step which seeks to minimize the number of these checks?
- steveklabnik 8y agoI'm not entirely sure what you mean, exactly. As far as I know, all of the usual optimization passes would already be working to minimize them.
- sanxiyn 8y agoRust could emit LLVM range metadata for ranged integers. IIRC, it already does so for enum discriminants.
- steveklabnik 8y agoThat seems quite good!