-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-langRelevant to the language teamRelevant to the language team
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-langRelevant to the language teamRelevant to the language team