# Design \`?\` to work on named blocks

**URL:** <https://internals.rust-lang.org/t/design-to-work-on-named-blocks/7312>\
**Category:** language design\
**Created:** [April 14, 2018, 7:31pm UTC](https://internals.rust-lang.org/t/design-to-work-on-named-blocks/7312 "2018-04-14T19:31:18Z")\
**Posts on this page:** 1\
**Showing post:** 35

<div class="post-metadata">

**Author:** ![repax](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/repax/32/1342_2.png) [@repax](https://internals.rust-lang.org/u/repax)\
**Post date:** [April 17, 2018, 1:15pm UTC](https://internals.rust-lang.org/t/design-to-work-on-named-blocks/7312/35 "2018-04-17T13:15:05Z")

</div>

### A small clarification

We currently have an experimental implementation of `do catch` blocks, tracking issue [#31436](https://github.com/rust-lang/rust/issues/31436). Enable with the following crate attribute: `#![feature(catch_expr)]`. Read the two RFCs [#243](https://github.com/rust-lang/rfcs/pull/243) and [#1859](https://github.com/rust-lang/rfcs/pull/1859) for more background.

**The main reason for this thread has been to discuss and evaluate an alternative and simplified design,** all under the presupposition that there is a strong interest within the Rust core team to make an advancement in the area of _in-function_ error capturing for the `?` operator.

### Simplified design?

In its essence, the whole proposal can be described as just one change to the `?` operator: that it can take an optional _label_.

- without the label: `(EXPR)?` the function is the exit point.
- with the label: `(EXPR)'a?` the block named `'a` is the exit point, implemented as `break 'a error;`.

### Goals

Is there any merit to this alternative design? Is it a good idea to reuse the already accepted (and for loops, already stable) feature of `break`-with-value as a means of propagating errors to specific points within the `fn`?

---

_[View the full topic](https://internals.rust-lang.org/t/design-to-work-on-named-blocks/7312)._
