diff options
| author | bors <bors@rust-lang.org> | 2014-04-13 04:06:53 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-13 04:06:53 -0700 |
| commit | 770b2fea06f96714b4602d54c0681dce8ad315b1 (patch) | |
| tree | 9faa52b8edee9f56f88425d3ed2a5d6ba6a98566 /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 2f790546504f869788f3c0e9585b51470773332f (diff) | |
| parent | 7a82d478a3c9301eda4453ec222842f750e13630 (diff) | |
| download | rust-770b2fea06f96714b4602d54c0681dce8ad315b1.tar.gz rust-770b2fea06f96714b4602d54c0681dce8ad315b1.zip | |
auto merge of #13468 : alexcrichton/rust/issue-13467, r=thestinger
Previously, all slices derived from a vector whose values were of size 0 had a null pointer as the 'data' pointer on the slice. This caused first pointer to be yielded during iteration to always be the null pointer. Due to the null pointer optimization, this meant that the first return value was None, instead of Some(&T). This commit changes slice construction from a Vec instance to use a base pointer of 1 if the values have zero size. This means that the iterator will never return null, and the iteration will proceed appropriately. Closes #13467
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
