Open nrc opened 7 years ago
If we infer ref
in patterns, will we ever need to explicitly tell Rust not to add ref
, like we need to use move
on closures?
(Let me know if I should wait for the actual RFC to get posted and move this comment there.)
match type &AnEnum
against AnEnum
? I don't think it's kind of 'pattern matching'.
Point of contact
@nrc
Overview
Make
match
easier to use and less boilerplate-y by auto-dereferencing in the condition expression and inferringref
s in the patterns.E.g.,
rather than (currently):
Status
Accepted as RFC 2005.
cc #17