Rollup merge of #33892 - seanmonstar:slice-eq-ptr, r=alexcrichton
Rollup merge of #33892 - seanmonstar:slice-eq-ptr, r=alexcrichton

core: check pointer equality when comparing byte slices

If pointer address and length are the same, it should be the same slice.

In experiments, I've seen that this doesn't happen as often in debug builds, but release builds seem to optimize to using a single pointer more often.

GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust