about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-06-22 15:00:53 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-06-27 08:14:09 +1000
commit00207ead61ecff9dba4e61e5828fd6a32330f6c0 (patch)
treeae58daa40094ff542088df8819bc8e43e03de329 /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentea74997c414779d5628b2a6a8a964582b20607c8 (diff)
downloadrust-00207ead61ecff9dba4e61e5828fd6a32330f6c0.tar.gz
rust-00207ead61ecff9dba4e61e5828fd6a32330f6c0.zip
Improve derived discriminant testing.
Currently the generated code for methods like `eq`, `ne`, and `partial_cmp`
includes stuff like this:
```
let __self_vi = ::core::intrinsics::discriminant_value(&*self);
let __arg_1_vi = ::core::intrinsics::discriminant_value(&*other);
if true && __self_vi == __arg_1_vi {
    ...
}
```
This commit removes the unnecessary `true &&`, and makes the generating
code a little easier to read in the process. It also fixes some errors
in comments.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions