about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-04 17:48:07 -0700
committerGitHub <noreply@github.com>2016-11-04 17:48:07 -0700
commite96b9d2bb48b7a886a4d2b9df716265af5d15646 (patch)
treeee3eff3c23fa1029bfa9e20a76ceb96f82e11406 /src/test/run-pass/thinlto
parent713a360560ab70651d10f09c9949673fa5e42fcd (diff)
parent67626e0cc30e07fe8763d344e855d7b4750b0b33 (diff)
downloadrust-e96b9d2bb48b7a886a4d2b9df716265af5d15646.tar.gz
rust-e96b9d2bb48b7a886a4d2b9df716265af5d15646.zip
Auto 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