The starting point of that paragraph was agreeing to the "structural/pure dereference" idea, and to the fact that it doesn't matter what syntax that uses. I should have made it more clear.
One question that now arises though is, how pure should the implementation be for that to count? For supporting
Rc and friends it has to at least allow access to arbitrary fields. But it would be cool if it could also support (slightly) more complex operations, such as checking an enum variant - for supporting
Cow, for example.
Regarding the syntax of the match, I liked your distinction that
* is used for all derefs. I guess that makes sense, as when borrowing you need to specify what kind of reference you want (
Rc/...) but when dereferncing it's decided what implementation to use depending on what you need. So here the distinction between
DerefMove (when it comes, or for
Box right now) could be done by having
let deref (ref binding) = <expr>;
let deref (ref mut binding) = <expr>;
let deref (binding) = <expr>;
as the duals of
let binding = &*<expr>;
let binding = &mut *<expr>;
let binding = *<expr>;
I assume this is what you meant?