External Publication
Visit Post

Pre-RFC improved ergonomics for `!`

Rust Internals [Unofficial] May 19, 2026
Source

I don't see why any concrete type, whether ! or (), avoids the mapping problem. Is it that you'd normally want to map ! to () in your use cases?

MusicalNinjaDad:

relying on Try doesn't add any real complexity IMO. It's the equivalent of .map(|x| try { x? }) rather than .map(|x| x).

Ah, and since Try is less magical than coercions, this looks like it can be implemented with a trait and blanket impl instead of compiler magic. Perhaps you could try making a (likely-nightly-only) crate with a map_try method?

Discussion in the ATmosphere

Loading comments...