The current implementation does not; the following does not compile (2017-04-18):
let _: Result<i32, ()> = do catch { 4 };
error[E0308]: mismatched types
--> src/main.rs:3:41
|
3 | let _: Result<i32, ()> = do catch { 4 };
| ^ expected enum `std::result::Result`, found integral variable
|
= note: expected type `std::result::Result<i32, ()>`
found type `{integer}`
Opening as #39849 (linked from tracking issue #31436) is closed.
From https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md#catch-expressions
The current implementation does not; the following does not compile (2017-04-18):
Error message:
Runnable: https://play.integer32.com/?gist=4e589a7b8f2ffff23f507fb66ac7f662&version=nightly
cc @nikomatsakis, who mentioned this in rust-lang/rfcs#1859 (comment)