Skip to content
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

Added overloaded Add and Sub traits for pointer arithmetic as per Issue #2122 #7631

Merged
merged 1 commit into from
Jul 10, 2013
Merged

Added overloaded Add and Sub traits for pointer arithmetic as per Issue #2122 #7631

merged 1 commit into from
Jul 10, 2013

Conversation

MarkJr94
Copy link
Contributor

@MarkJr94 MarkJr94 commented Jul 7, 2013

Added Add and Sub traits for pointer arithmetic. Any type that is a std::num::Int can be added to or subtracted from a pointer. Also my additions did not require any unsafe code, and the operators themselves are safe. Fixes #2122.

@MarkJr94 MarkJr94 closed this Jul 7, 2013
@MarkJr94 MarkJr94 reopened this Jul 7, 2013
@thestinger thestinger closed this Jul 8, 2013
@thestinger thestinger reopened this Jul 9, 2013
Implemented ptr arithmetic for *T and *mut T. Tests passing
bors added a commit that referenced this pull request Jul 10, 2013
Added Add and Sub traits for pointer arithmetic. Any type that is a ```std::num::Int``` can be added to or subtracted from a pointer. Also my additions did not require any unsafe code, and the operators themselves are safe. Fixes #2122.
@bors bors closed this Jul 10, 2013
@bors bors merged commit 294999c into rust-lang:master Jul 10, 2013
@MarkJr94 MarkJr94 deleted the ptr_arithmetic branch July 15, 2013 17:22
@MarkJr94 MarkJr94 restored the ptr_arithmetic branch July 15, 2013 17:22
@MarkJr94 MarkJr94 deleted the ptr_arithmetic branch July 15, 2013 17:22
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 8, 2021
Use binary-dep-depinfo to resolve UI test dependencies

Closes rust-lang#7343
Closes rust-lang#6809
Closes rust-lang#3643

changelog: none

r? `@flip1995`
cc `@Jarcho`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add overloaded operators for ptr
3 participants