]> git.lizzy.rs Git - rust.git/commitdiff
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)
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.

1  2 
src/libcore/slice.rs

Simple merge