diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-11-04 16:49:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-11-05 10:50:22 -0700 |
| commit | 041f890cfe943741112232d394875f37a1659a07 (patch) | |
| tree | 1644f5a320f548f049f1b872c9d97122ea5932a5 /src/test/run-pass/thinlto | |
| parent | 1a0963292aa6d78a4de05dbee853d0efe6cefe8a (diff) | |
| parent | 67626e0cc30e07fe8763d344e855d7b4750b0b33 (diff) | |
| download | rust-041f890cfe943741112232d394875f37a1659a07.tar.gz rust-041f890cfe943741112232d394875f37a1659a07.zip | |
Rollup merge of #37422 - bluss:wrapping-offset, r=alexcrichton
Add .wrapping_offset() methods .wrapping_offset() exposes the arith_offset intrinsic in the core module (as methods on raw pointers, next to offset). This is the first step in making it possible to stabilize the interface later. `arith_offset` is a useful tool for developing iterators for two reasons: 1. `arith_offset` is used by the slice's iterator, the most important iterator in libcore, and it is natural that Rust users need the same power available to implement similar iterators. 2. It is a good way to implement raw pointer iterations with step greater than one. The name seems to fit the style of methods like "wrapping_add".
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
