Commit 7694e18
committed
Rollup merge of rust-lang#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.1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
1833 | 1836 | | |
1834 | 1837 | | |
1835 | 1838 | | |
| |||
0 commit comments