rust/compiler/rustc_macros/src
bors 8841bee954 Auto merge of #103556 - clubby789:specialize-option-partial-eq, r=scottmcm
Manually implement PartialEq for Option<T> and specialize non-nullable types

This PR manually implements `PartialEq` and `StructuralPartialEq` for `Option`, which seems to produce slightly better codegen than the automatically derived implementation.

It also allows specializing on the `core::num::NonZero*` and `core::ptr::NonNull` types, taking advantage of the niche optimization by transmuting the `Option<T>` to `T` to be compared directly, which can be done in just two instructions.

A comparison of the original, new and specialized code generation is available [here](https://godbolt.org/z/dE4jxdYsa).
2022-11-26 08:56:20 +00:00
..
diagnostics Improve slug name error 2022-11-21 15:24:51 +01:00
symbols
hash_stable.rs
lib.rs Auto merge of #103556 - clubby789:specialize-option-partial-eq, r=scottmcm 2022-11-26 08:56:20 +00:00
lift.rs
newtype.rs Specialize PartialEq for Option<newtype> 2022-10-31 16:43:57 +00:00
query.rs Get rid of rustc_query_description! 2022-10-14 22:35:56 +02:00
serialize.rs
symbols.rs
type_foldable.rs
type_visitable.rs