mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
![]() 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 "*". |
||
---|---|---|
.. | ||
nonstandard_style | ||
array_into_iter.rs | ||
builtin.rs | ||
context.rs | ||
early.rs | ||
internal.rs | ||
late.rs | ||
levels.rs | ||
lib.rs | ||
methods.rs | ||
non_ascii_idents.rs | ||
non_fmt_panic.rs | ||
nonstandard_style.rs | ||
passes.rs | ||
redundant_semicolon.rs | ||
traits.rs | ||
types.rs | ||
unused.rs |