4 ms·
The niche concept isn't permanently unstable, but the present mechanism is. Today the only way to make such a type is to use the magic attributes #[rustc_nonnu
by tialaramex 3y ago
The niche concept isn't permanently unstable, but the present mechanism is. Today the only way to make such a type is to use the magic attributes
#[rustc_nonnull_optimization_guaranteed]
#[rustc_layout_scalar_valid_range_start]
and
#[rustc_layout_scalar_valid_range_end]
As their names hint, these are permanently unstable compiler-only type hints.
I asked that some means be found to stabilize some equivalent hint (presumably with a name that doesn't look like a compiler-only feature) in one of the long series of tickets spawned after 3334 and I was persuaded that this is a terrible idea and won't happen.
Instead the proposed path forward is (at least was then) Pattern Types. Build at least an MVP of the full blown Pattern Types feature instead of a custom attribute.