logoalt Hacker News

fluffiac • today at 7:03 PM • 1 reply • view on HN

yay never type!!

when can we expect `Result::into_ok` and `Result::into_err` to land? the blog post includes the `infallible_unwrap` demo which is the exact functionality these two functions implement. i wonder why they didn't release these at the same time as never?


Replies

NobodyNada • today at 7:07 PM

Those were stabilized in https://github.com/rust-lang/rust/pull/161712, which just barely missed the cutoff date for 1.100 and is on the 1.101 release train.

(As for why they weren't stabilized at the same time: because it's not worth adding more baggage to a major, difficult stabilization process; as that would just be more surface area that has to be reviewed and another source of potential issues or delays. Instead, the stabilization process for infallible_unwrap was started immediately after `!` was stabilized. That process includes a 2-week final comment period for community feedback which is why they landed in different releases.)