Pre-RFC improved ergonomics for `!`
robofinch:
Imagine that someone had
UninhabitedErr<T, E>(Result<T, E>)whose safety invariant is thatEis an uninhabited 1-aligned ZST, as enforced byunsafeconstructors?
That's a good example. I've bookmarked for later (if there is a later).
If I understand correctly: constructing an UninhabitedErr<T, E> would be unsafe. Which would make the validation simple: can both types be constructed without unsafe.
robofinch:
(Note: I have my “library author” hat on, I’m not a compiler dev. So, I’m used to being very paranoid to attempt to write bulletproof
unsafecode, while the compiler devs probably have a better grasp of what sorts of code actually exist out there, and the language does occasionally make breaking changes after a lot of communication.)
I'm also coming at this as a library author with a similar view of unsafe . And "could break unsafe code" has been the killer for any previous attempts to look at this - which is a stance I'm not going to challenge (both because I agree with it and I don't have anywhere the background to do so)
Discussion in the ATmosphere