Skip to content

Commit

Permalink
Auto merge of #108483 - scottmcm:unify-bytewise-eq-traits, r=the8472
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Mar 1, 2023
2 parents a25f0ee + e6634d1 commit eb284d4
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit eb284d4

Please sign in to comment.