3 ms·
This is being worked on. See the Try trait in std::ops. It's implemented for Result, Option and Poll (the `try!` macro only ever worked with Result). Implementi
by ChrisSD 7y ago
This is being worked on. See the Try trait in std::ops. It's implemented for Result, Option and Poll (the `try!` macro only ever worked with Result). Implementing it for your own types is currently unstable because sorting out all the edge cases is proving to be difficult.
But the intent is definitely to stabilize it once a good general solution is found.
- _bxg1 7y agoThat's good to know. And I suppose there are other cases where "special language features" can be hooked into via the (wonderful) traits system, like Drop, so I guess that does go some way toward relieving the sting of having magical syntaxes.