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
Rollup merge of #145791 - samueltardieu:fix-zst-to-enum-mir-validation, r=compiler-errors
Fix ICE when validating transmuting ZST to inhabited enum
MIR validation attempts to determine the number of bytes needed to represent the size of the source type to compute the discriminant for the inhabited target enum. For a ZST source, there is no source data to use as a discriminant so no proper runtime check can be generated.
Since that should never be possible, insert a delayed bug to ensure the problem has been properly reported to the user by the type checker.
Fixesrust-lang/rust#145786
0 commit comments