Ugh I've definitely wanted this before, where I group things logically together by enum, but have time type signature in a fn be able to work as if it was it's own type. I know only one type goes in, but rust makes me handle the rest
-
-
-
I end up using unchecked_unreachable in that case but I like it when the compiler figured out for me
- 2 more replies
New conversation -
-
-
I wrote an rfc for this. The major unanswered question was around type inference with fallback from variant to enum types. I would love to resurrect this next year
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
variant types is a proposal that crops up often, I don't think there's any major opposition to it? (icbw) but it's probably a matter of priority
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.