-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .wrapping_offset() methods #37422
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
2a3eb28
to
ef591e5
Compare
.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".
ef591e5
to
8b2108c
Compare
Sounds great to me! @rfcbot fcp merge |
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 psst @alexcrichton, I wasn't able to add the |
Ok! @bluss want to open a tracking issue for this and I'll r+? |
Great! Tracking issue is #37570 |
@bors: r+ |
📌 Commit 67626e0 has been approved by |
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".
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".
⌛ Testing commit 67626e0 with merge e96b9d2... |
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".
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".
.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 tworeasons:
arith_offset
is used by the slice's iterator, the most importantiterator in libcore, and it is natural that Rust users need the same
power available to implement similar iterators.
greater than one.
The name seems to fit the style of methods like "wrapping_add".