# Is it possible to have a better .expect() function that accept formatted literials?

**URL:** <https://internals.rust-lang.org/t/is-it-possible-to-have-a-better-expect-function-that-accept-formatted-literials/23789>\
**Category:** Uncategorized\
**Created:** [December 3, 2025, 3:17am UTC](https://internals.rust-lang.org/t/is-it-possible-to-have-a-better-expect-function-that-accept-formatted-literials/23789 "2025-12-03T03:17:48Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![scottmcm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/scottmcm/32/2355_2.png) [@scottmcm](https://internals.rust-lang.org/u/scottmcm)\
**Post date:** [December 4, 2025, 5:40pm UTC](https://internals.rust-lang.org/t/is-it-possible-to-have-a-better-expect-function-that-accept-formatted-literials/23789/7 "2025-12-04T17:40:59Z")

</div>

> [@ekuber](#):
>
> This not _terrible_, but makes me miss let-else 🙂

If we were going to do something for this, I think it's this: ["else match" Extending Conditional Syntax - #8 by scottmcm](https://internals.rust-lang.org/t/else-match-extending-conditional-syntax/23780/8)

But it would need someone to analyze the frequency and prevalence at which that would both be applicable and not just be `.unwrap_or_else(|e| panic!("error: {e:?}"))`.

---

_[View the full topic](https://internals.rust-lang.org/t/is-it-possible-to-have-a-better-expect-function-that-accept-formatted-literials/23789)._
