Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a variant index and variant discriminant confusion
Previously for enums using the `Variants::Single` layout, the variant index was being confused with its discriminant. For example, in the case of `enum E { A = 1 }`. Use `discriminant_for_variant` to avoid the issue.
- Loading branch information