diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-02-10 12:24:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-10 12:24:28 +0900 |
| commit | a58feb9282c8e7df7f436d2c78147c36c422867c (patch) | |
| tree | 5c32354f6ae10559710975bfbfa0c65f94bb2402 /compiler/rustc_codegen_llvm/src | |
| parent | 812910898a34204d3b8deabc20189ebc9ff8cb0b (diff) | |
| parent | c4e3558b8c8af8ced8ea3b4b018bc6bccbb0ff73 (diff) | |
| download | rust-a58feb9282c8e7df7f436d2c78147c36c422867c.tar.gz rust-a58feb9282c8e7df7f436d2c78147c36c422867c.zip | |
Rollup merge of #81913 - osa1:rename_unop_variants, r=matthewjasper
Rename HIR UnOp variants
This renames the variants in HIR UnOp from
enum UnOp {
UnDeref,
UnNot,
UnNeg,
}
to
enum UnOp {
Deref,
Not,
Neg,
}
Motivations:
- This is more consistent with the rest of the code base where most enum
variants don't have a prefix.
- These variants are never used without the `UnOp` prefix so the extra
`Un` prefix doesn't help with readability. E.g. we don't have any
`UnDeref`s in the code, we only have `UnOp::UnDeref`.
- MIR `UnOp` type variants don't have a prefix so this is more
consistent with MIR types.
- "un" prefix reads like "inverse" or "reverse", so as a beginner in
rustc code base when I see "UnDeref" what comes to my mind is
something like `&*` instead of just `*`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
