Skip to content

Conversation

@RalfJung
Copy link
Member

@RalfJung RalfJung commented Nov 1, 2024

This is an API that naturally should exist as a combination of byte_offset_from and sub_ptr
both existing (they showed up at similar times so this union was never made). Adding these
is a logical (and perhaps final) precondition of stabilizing ptr_sub_ptr (#95892).

Original PR by @Gankra (#121919), I am just reviving it. The 2nd commit (with a small docs tweak) is by me.

Gankra and others added 2 commits November 1, 2024 15:27
This is an API that naturally should exist as a combination of byte_offset_from and sub_ptr
both existing (they showed up at similar times so this union was never made). Adding these
is a logical (and perhaps final) precondition of stabilizing ptr_sub_ptr (rust-lang#95892).
@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 1, 2024
@RalfJung RalfJung changed the title feat(byte_sub_ptr): add ptr::byte_sub_ptr feat(byte_sub_ptr): unstably add ptr::byte_sub_ptr Nov 1, 2024
@scottmcm
Copy link
Member

scottmcm commented Nov 1, 2024

Thanks for reviving, Ralf! Agree this is an obvious add.

r? scottmcm
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 1, 2024

📌 Commit c388655 has been approved by scottmcm

It is now in the queue for this repository.

@rustbot rustbot assigned scottmcm and unassigned Mark-Simulacrum Nov 1, 2024
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 1, 2024
@bors bors merged commit 305ca05 into rust-lang:master Nov 2, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 2, 2024
@RalfJung RalfJung deleted the byte_sub_ptr branch November 2, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants