Given the 2017 roadmap, I was wondering whether anyone's accumulating a checklist of things to be explained in some reasonably-accessible rust documentation sometime in the near future. It's happened multiple times that people have mentioned rust behavior that's been surprising to me or to others, and once we discover it, it hasn't prevent someone else from running into the same confusion again.
I was wondering whether there was a TODO list to which I can add these interesting rust-isms to be addressed at some point.
Examples
-
&{foo}
movingfoo
into the{}
block and taking a reference to the moved value (this pattern should probably be detected by the compiler to provide a friendlier error) - Trait objects where the object part of the trait is actually a struct whose last member implements the trait. E.g.
struct Wrapper<A: ?Sized + Trait>(u32, u32, A);
allows one to create the trait objectWrapper<Trait>
.
which was an epiphany to me.
I'm sure there are plenty more.