diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-11 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-11-20 10:31:17 +0100 |
| commit | c3e71d83cdeb0ccaf6584255313380fd166b1096 (patch) | |
| tree | bf300228dff91ce2ec224e4af4fd0df90cefb35b /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | d5a91f3114dde5a32dc69f9114fca0d9b0fd2abc (diff) | |
| download | rust-c3e71d83cdeb0ccaf6584255313380fd166b1096.tar.gz rust-c3e71d83cdeb0ccaf6584255313380fd166b1096.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
