-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
try-blocks and label-break-value do not work together. #72483
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-label_break_value`#![feature(label_break_value)]``#![feature(label_break_value)]`F-try_blocks`#![feature(try_blocks)]``#![feature(try_blocks)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Description
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-label_break_value`#![feature(label_break_value)]``#![feature(label_break_value)]`F-try_blocks`#![feature(try_blocks)]``#![feature(try_blocks)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
I've been playing around with
label-break-valuetoday, and it comes in super handy inasyncblocks. However, it seems to run into issues when combined with thetry_blocksfeature.I tried this code:
I expected to see this happen: the code should compile just fine.
Instead, this happened:
This is a continuation of the discussion here. As @ciphergoth pointed out, this code (following the syntactic sugar from the label-break-value RFC) compiles:
Meta
rustc --version --verbose:This issue has been assigned to @samrat via this comment.