3 ms·
> permanently unstable compiler-only feature Arbitrary niches aren't intended to be permanently unstable (at least not in the sense of explicit implementation
by kibwen 3y ago
> permanently unstable compiler-only feature
Arbitrary niches aren't intended to be permanently unstable (at least not in the sense of explicit implementation details like lang items and intrinsics), people have expressed a desire to stabilize them for years (as discussed during the original nonzero int types RFC). If something has changed in that regard, I'd appreciate a link to a discussion.
- tialaramex 3y agoThe 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.