catch blocks can produce non-Try values #43818
Labels
C-bug
Category: This is a bug.
I-needs-decision
Issue: In need of a decision.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
This works today, and I think it's not supposed to:
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 someimpl Try<Ok=i32>
, not a rawi32
.)cc
catch
tracking issue: #31436The text was updated successfully, but these errors were encountered: