]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #33892 - seanmonstar:slice-eq-ptr, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 1 Jun 2016 07:27:41 +0000 (12:57 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Wed, 1 Jun 2016 07:27:41 +0000 (12:57 +0530)
commit7694e18d4351b046ff8201af178bb82f9cbec34a
treea2a23c4ab2aced3c4f43a6c2a5d082a7cb17fc2d
parent4721f3a543ef00952d5ce39b64dbfe1ce57667fd
parent6af17e69ff5a69892aff4d82b293de2ec7f5050a
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.
src/libcore/slice.rs