External Publication
Visit Post

Pre-RFC improved ergonomics for `!`

Rust Internals [Unofficial] May 17, 2026
Source

MusicalNinjaDad:

can both types be constructed without unsafe.

While I know Rust has some implicit magic that goes away with manual impls and other implementation-detail-looking-things (auto trait impls, generic parameter variance, to some extent Drop and dropck, no doubt several other such things), I would strongly dislike this approach. This sort of analysis feels too fragile.

I think needing to remember the magic boilerplate in C++ to remove unwanted automatically-provided functions can be confusing. Sure, you only have to learn it once, but still.

Plus, imagine the safe constructor takes in an input which can only be constructed via unsafe. Could be arbitrarily complicated.

Discussion in the ATmosphere

Loading comments...