rust/library/core
bors 7f3dc04644 Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
Make wrapping_neg() use wrapping_sub(), #[inline(always)]

This is a follow-up change to the fix for #75598. It simplifies the implementation of wrapping_neg() for all integer types by just calling 0.wrapping_sub(self) and always inlines it. This leads to much less assembly code being emitted for opt-level≤1 and thus much better performance for debug-compiled code.

Background is [this discussion on the internals forum](https://internals.rust-lang.org/t/why-does-rust-generate-10x-as-much-unoptimized-assembly-as-gcc/14930).
2021-08-04 12:58:31 +00:00
..
benches Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
src Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se 2021-08-04 12:58:31 +00:00
tests Auto merge of #87689 - JohnTitor:rollup-ns38b56, r=JohnTitor 2021-08-02 02:33:16 +00:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00