Jacob Pratt
Jacob Pratt
@varkor What's the way forward on this? It seems like it's a good idea, given that it would reduce the special-casing in the compiler.
After a slight bit of discussion on Reddit, a couple things came up. Would the `true` and `false` keywords need to be removed? Intuitively, I don't think it would be...
@SimonSapin What's the harm in leaving this open, in case someone wanted to at least try it to see the admittedly uncertain benefits? That's what I was going to do,...
As was also started in the internals thread, I am of the opinion this doesn't need an RFC.
> Note that `resize_default` was deemed unnecessary in [rust-lang/rust#41758 (comment)](https://github.com/rust-lang/rust/issues/41758#issuecomment-449719961) -- I think the same "just pass the function" may well apply here. I've got a feeling this would be...
I haven't created an RFC for this yet, but I have a WIP implementation of custom literals [on my rust-lang/rust fork](https://github.com/jhpratt/rust/tree/nonzero-literals2). Given the lack of documentation there, I'll briefly explain...
Just for reference I'm starting to write an RFC that would permit this in patterns (nb: not construction).
@GoldsteinE go for it!
There's other places than `match`, though. What about `if let Some(_::East) = maybe_dir {}`? Generalizing to anywhere patterns are permitted seems reasonable.
I still plan on an RFC that would permit it in pattern matching (but not construction/literals). When I brought it up on IRLO a while back there was general support...