about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorUlrik Sverdrup <bluss@users.noreply.github.com>2016-10-26 23:05:06 +0200
committerUlrik Sverdrup <bluss@users.noreply.github.com>2016-10-27 00:07:26 +0200
commit8b2108c6cb6b60f01b2ff01ef81861dcbc02fec7 (patch)
tree12016be1a4aa99efc248e16759fec3b0dca9c816 /src/test/run-pass/thinlto
parent0c429872a32c3005cf2b347025163361218634a4 (diff)
downloadrust-8b2108c6cb6b60f01b2ff01ef81861dcbc02fec7.tar.gz
rust-8b2108c6cb6b60f01b2ff01ef81861dcbc02fec7.zip
core::ptr: Add .wrapping_offset() methods
.wrapping_offset() exposes the arith_offset intrinsic in the core
module. 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