Ok so can anyone explain to me why anyone should care about the semantics of `match never { x => { ... } }`? Isn't the match dead code?
-
-
Replying to @Gankra_
It's the semantics of `match never { }` you have to care about.
1 reply 0 retweets 0 likes -
-
Replying to @Gankra_
Read the RFC. It's about semantics of matching w/ trap values and how it relates to UB for all types.
1 reply 0 retweets 0 likes -
-
Replying to @Gankra_
TL;DR: match (!,) {} should compile and evaluating it should be UB making it the same as match ! {}
2 replies 0 retweets 0 likes -
Replying to @sgrif
The rest of it is just semantics of when matching a trap value can result in UB
1 reply 0 retweets 0 likes -
Replying to @sgrif
it seems like the actual question is just "is it ok to unify mem::uninitialized with Never", which seems like "obviously not"?
1 reply 0 retweets 0 likes -
Replying to @Gankra_
Yes, but that then raises questions about other types. Unsafe code has uninitialized all over.
1 reply 0 retweets 0 likes -
Replying to @sgrif
I just don't see why this is a problem for stabilizing Never, then, if it's a problem for e.g. bool.
2 replies 0 retweets 0 likes
Some people want this answered before stabilizing I guess
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.