Upcoming const breakthrough

346 points Beamsters 42 comments

I noticed that in the past week or two, Rust team has been pushing a breakthrough with const Trait and const *Fn which gates pretty much everything from Ops, Default, PartialEq, Index, Slice, From, Into, Clone ... etc.

Now the nightly rust is actively populating itself with tons of const changes which I appreciated so much. I'd like to thank all of the guys who made the hard work and spearheaded these features.

RFC 3762 - Make trait methods callable in const contexts

const_default

const_cmp

const_index

const_from

const_slice_index

const_ops