Closed Jules-Bertholet closed 1 year ago
Hmm, the docs say it's still unstable, so I guess they stabilised it for return types only? In that case I'm not sure I want to merge this. Surely if it's unstable outside of return position, cheating like this will only reveal why it's unstable... either way, it's messy, and the current state works fine.
The type itself is fully stable to use in any position. For example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4fd415a79202594552205601102ea67a
What's unstable is:
!
, outside of return types (hence the need for the alias)()
to !
core::convert::Infallible
a type alias for !
.Another option is to make Never
an alias for core::convert::Infallible
instead.
Ah, good to know. The intention was to remove Never
once users are able to use the real type, so I don't want to merge this as it just makes the temporary solution more complicated. Thanks for the info though.
The docs currently imply that
!
has not yet been stabilized. This is false. This PR changesNever
to use the real, stable!
.