You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Storing value in an enum type other than one of the predefined variants is undefined behaviour, that is, it's fundamentally incorrect and invalid to do it, even (especially!) in unsafe code. Hence this isn't a bug.
See the manual for the full list of UB, for this specific case:
Invalid values in primitive types, even in private fields/locals:
A discriminant in an enum not included in the type definition
node_args doesn't work with struct literals and expr_ty must be used
instead
r? @y21
changelog: none
(No changelog, as this ICE didn't make it to the Rust repo, as it was
caught during the sync)
Fixesrust-lang#14325
This program incorrectly prints "second branch" even though the match expression should fail.
The text was updated successfully, but these errors were encountered: