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

deprecate wrapping_offset_from #73580

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

RalfJung
Copy link
Member

As per #41079 (comment) which seems like a consensus.

r? @Amanieu

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Jun 21, 2020

cc @scottmcm who originally mused whether we want a wrapping_* variant of this

@RalfJung RalfJung force-pushed the deprecate-wrapping-offset-from branch from cebf727 to 467415d Compare June 21, 2020 11:50
@Amanieu
Copy link
Member

Amanieu commented Jun 21, 2020

r=me assuming no objections.

@RalfJung
Copy link
Member Author

@rust-lang/libs any objections to this deprecation of the unstable method wrapping_offset_from? @Amanieu said about it some time ago

Regarding wrapping_offset_from, I personally feel that there isn't much point to this function. The only thing that I can think of could be to calculate the position of a &T in a slice without using any unsafe code, but then again this is sufficiently niche that I don't feel it is worth adding a function just for that.

@dtolnay dtolnay added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jun 21, 2020
@dtolnay
Copy link
Member

dtolnay commented Jun 21, 2020

I see a 👍 from sfackler so with three of us I think this is good to go.
@bors r=Amanieu

@bors
Copy link
Contributor

bors commented Jun 21, 2020

📌 Commit 467415d has been approved by Amanieu

@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 Jun 21, 2020
@RalfJung
Copy link
Member Author

@bors rollup

Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 21, 2020
…from, r=Amanieu

deprecate wrapping_offset_from

As per rust-lang#41079 (comment) which seems like a consensus.

r? @Amanieu
Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 21, 2020
…from, r=Amanieu

deprecate wrapping_offset_from

As per rust-lang#41079 (comment) which seems like a consensus.

r? @Amanieu
Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 22, 2020
…from, r=Amanieu

deprecate wrapping_offset_from

As per rust-lang#41079 (comment) which seems like a consensus.

r? @Amanieu
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 22, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#71660 (impl PartialEq<Vec<B>> for &[A], &mut [A])
 - rust-lang#72623 (Prefer accessible paths in 'use' suggestions)
 - rust-lang#73502 (Add E0765)
 - rust-lang#73580 (deprecate wrapping_offset_from)
 - rust-lang#73582 (Miri: replace many bug! by span_bug!)
 - rust-lang#73585 (Do not send a notification for P-high stable regressions)

Failed merges:

 - rust-lang#73581 (Create 0766 error code)

r? @ghost
@bors bors merged commit 35ecb26 into rust-lang:master Jun 22, 2020
@scottmcm
Copy link
Member

Thanks for the ping here, @oli-obk. My recollection is that that musing was from way back when the only method was the safe one (https://doc.rust-lang.org/1.22.0/std/primitive.pointer.html#method.offset_to), and I thought that there should probably be an unsafe one. I have no attachment to the safe one, and am fine with its removal.

yvt added a commit to r3-os/r3 that referenced this pull request Jun 25, 2020
@RalfJung RalfJung deleted the deprecate-wrapping-offset-from branch June 28, 2020 07:19
fw-immunant added a commit to immunant/c2rust that referenced this pull request Mar 31, 2022
fw-immunant added a commit to immunant/c2rust that referenced this pull request Mar 31, 2022
fw-immunant added a commit to immunant/c2rust that referenced this pull request Apr 13, 2022
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
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-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants