Auto merge of #108483 - scottmcm:unify-bytewise-eq-traits, r=the8472

Merge two different equality specialization traits in `core`

Arrays and slices each had their own version of this, without a matching set of `impl`s.

Merge them into one (still-`pub(crate)`) `cmp::BytewiseEq` trait, so we can stop doing all these things twice.

And that means that the `[T]::eq` → `memcmp` specialization picks up a bunch of types where that previously only worked for arrays, so examples like <https://rust.godbolt.org/z/KjsG8MGGT> will use it now instead of emitting loops.

r? the8472
This commit is contained in:
bors 2023-03-01 23:34:37 +00:00
commit eb284d4639

Diff content is not available