You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R64 does have some niche values (e.g. Nan values), is it possible to somehow communicate them to the compiler to optimize the size of Option<R64>, so that it's no bigger ?
The text was updated successfully, but these errors were encountered:
Rust does it internally for all the NonZero types using
#[rustc_layout_scalar_valid_range_start(1)]
There is also rustc_layout_scalar_valid_range_end(). However these can only be used internally (or maybe on nightly).
So the only way to do it on stable is to use NonZero and add setters/getters that convert the niche value to 0. That's how nonmax works (see this code).
R64
does have some niche values (e.g. Nan values), is it possible to somehow communicate them to the compiler to optimize the size ofOption<R64>
, so that it's no bigger ?The text was updated successfully, but these errors were encountered: