Closed
Description
This works today, and I think it's not supposed to:
let x: i32 = do catch { 4 };
Repro: https://play.rust-lang.org/?gist=0c5b165abf4c06ff5821550986db4531&version=nightly
The value that comes out of a catch seems like it's supposed to only be something that's Try
, since otherwise you cannot use ?
inside the catch. (Magic ok-wrapping could make the block itself legal, but it'd still need to return some impl Try<Ok=i32>
, not a raw i32
.)
cc catch
tracking issue: #31436