back

by dmit·5y ago·view on hn ↗
All of these have workarounds (obviously), but here are the unstable features I'm using in my most recent (<10kloc) project:

  #![feature(bound_cloned)]
  #![feature(const_float_classify)]
  #![feature(const_fn)]
  #![feature(const_fn_floating_point_arithmetic)]
  #![feature(const_generics)]
  #![feature(const_panic)]
  #![feature(once_cell)]
  #![feature(option_result_contains)]
  #![feature(or_patterns)]
  #![feature(str_split_once)]
once_cell supersedes the eponymous crate.

or_patterns are pleasant syntax sugar.

bound_cloned, option_result_contains, str_split_once are minor convenience shortcuts for things you can do slightly more verbosely on stable.

The other half are all about const generics and const fns. You can emulate some of them on stable, but the cost far outweighs that of switching to nightly in my case.

1 comments
I had a bit of Haskell reflex when seeing such feature list.
Ha, fair enough. But hey, this is a personal side project and I don't mind kicking the tires of a couple upcoming features before they get stabilized. Gotta help out oli-obk on his quest to const all the things.