They are currently valid:
struct Foo; impl Foo { fn by_val(self: Foo) {}
Until recently , Rust did not have this explicit form of self , only self , &self , &mut self and ~self (the old name Box ). This has changed so that only by value and by reference they have a short syntax, since they are common cases and have very important language properties, while all smart pointers (including Box ) require an explicit form.
However, impl processing impl not generalized according to the syntax, which means that non- Box pointers still do not work. I believe that this requires the so-called 'trait reform' , which has not yet been implemented.
The current discussion is in issue 44874 .
(We are looking forward to something!)
huon
source share