rust/compiler
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
..
rustc rustc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-02 17:49:36 +02:00
rustc_abi move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
rustc_apfloat
rustc_arena rustc_arena: remove a couple of ref patterns 2022-11-22 18:49:29 +00:00
rustc_ast Suggest .clone() or ref binding on E0382 2022-11-23 12:17:47 -08:00
rustc_ast_lowering Auto merge of #104321 - Swatinem:async-gen, r=oli-obk 2022-11-24 17:14:42 +00:00
rustc_ast_passes Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
rustc_ast_pretty Suggest .clone() or ref binding on E0382 2022-11-23 12:17:47 -08:00
rustc_attr Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_baked_icu_data Update crate documentation of rustc_baked_icu_data crate 2022-11-18 14:46:36 -08:00
rustc_borrowck Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
rustc_builtin_macros Rollup merge of #103908 - estebank:consider-cloning, r=compiler-errors 2022-11-24 08:42:33 +01:00
rustc_codegen_cranelift Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_codegen_gcc Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
rustc_codegen_llvm Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_codegen_ssa Rollup merge of #104797 - weihanglo:stream-write-dwp, r=jackh726 2022-11-25 18:35:40 +01:00
rustc_const_eval Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_data_structures Auto merge of #97870 - eggyal:inplace_fold_spec, r=wesleywiser 2022-11-19 02:28:47 +00:00
rustc_driver Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_error_codes Auto merge of #103491 - cjgillot:self-rpit, r=oli-obk 2022-11-21 12:17:03 +00:00
rustc_error_messages Rollup merge of #104621 - YC:master, r=davidtwco 2022-11-22 22:54:40 -05:00
rustc_errors Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obk 2022-11-24 21:34:54 +01:00
rustc_expand Clarify SyntaxExtensionKind::LegacyDerive. 2022-11-25 09:13:27 +11:00
rustc_feature Auto merge of #103491 - cjgillot:self-rpit, r=oli-obk 2022-11-21 12:17:03 +00:00
rustc_fs_util
rustc_graphviz Add initial version of value analysis and dataflow constant propagation 2022-11-07 10:35:08 +01:00
rustc_hir Auto merge of #104321 - Swatinem:async-gen, r=oli-obk 2022-11-24 17:14:42 +00:00
rustc_hir_analysis Add expand_abstract_const 2022-11-25 09:28:43 +00:00
rustc_hir_pretty Store a LocalDefId in hir::Variant & hir::Field. 2022-11-13 14:06:51 +00:00
rustc_hir_typeck Auto merge of #104902 - matthiaskrgr:rollup-oo27a4u, r=matthiaskrgr 2022-11-25 19:09:30 +00:00
rustc_incremental make error_reported check for delayed bugs 2022-11-24 11:12:46 +00:00
rustc_index move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
rustc_infer Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_interface Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_lexer Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_lint Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
rustc_lint_defs Make deref_into_dyn_supertrait lint the impl and not the usage 2022-11-23 15:40:27 +00:00
rustc_llvm Rollup merge of #104517 - dfordivam:patch-1, r=cuviper 2022-11-24 08:42:33 +01:00
rustc_log Use IsTerminal in rustc_log 2022-10-16 15:10:40 +01:00
rustc_macros Auto merge of #103556 - clubby789:specialize-option-partial-eq, r=scottmcm 2022-11-26 08:56:20 +00:00
rustc_metadata Auto merge of #104730 - petrochenkov:modchild5, r=cjgillot 2022-11-26 05:41:34 +00:00
rustc_middle Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_mir_build Rollup merge of #103908 - estebank:consider-cloning, r=compiler-errors 2022-11-24 08:42:33 +01:00
rustc_mir_dataflow Allow iterators instead of requiring slices that will get turned into iterators 2022-11-21 20:33:55 +00:00
rustc_mir_transform Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
rustc_monomorphize Stop passing the self-type as a separate argument. 2022-11-21 20:39:46 +00:00
rustc_parse Rollup merge of #103908 - estebank:consider-cloning, r=compiler-errors 2022-11-24 08:42:33 +01:00
rustc_parse_format shift no characters when using raw string literals 2022-11-15 14:28:20 +09:00
rustc_passes Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_plugin_impl Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_privacy Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_query_impl Add empty ConstKind::Abstract 2022-11-25 09:28:43 +00:00
rustc_query_system Rollup merge of #104780 - BoxyUwU:error_reported_not_be_bad, r=oli-obk 2022-11-24 21:34:54 +01:00
rustc_resolve Auto merge of #104730 - petrochenkov:modchild5, r=cjgillot 2022-11-26 05:41:34 +00:00
rustc_save_analysis Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser 2022-11-24 00:17:35 +00:00
rustc_serialize rustdoc: use ThinVec for cleaned generics 2022-11-02 16:17:22 -07:00
rustc_session Auto merge of #104845 - matthiaskrgr:rollup-tckj956, r=matthiaskrgr 2022-11-24 23:45:32 +00:00
rustc_smir
rustc_span Avoid GenFuture shim when compiling async constructs 2022-11-24 10:04:27 +01:00
rustc_symbol_mangling Add empty ConstKind::Abstract 2022-11-25 09:28:43 +00:00
rustc_target move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
rustc_trait_selection Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_traits Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
rustc_transmute Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisa 2022-11-05 13:48:30 +00:00
rustc_ty_utils Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU 2022-11-25 22:56:59 +00:00
rustc_type_ir Remove some unnecessary slicing 2022-11-21 20:38:55 +00:00