Skip to content

Commit b328913

Browse files
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. Fixes rust-lang/rust#145786
2 parents 5e02708 + 3d348f4 commit b328913

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)