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

Rename atomic 'as_mut_ptr' to 'as_ptr' to match Cell (ref #66893) #107736

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Feb 6, 2023

Originally discussed in #66893 (comment)

This uses #107706 as a base to avoid a merge conflict once that gets rolled up (so disregard const changes in the diff until it does) all merged & rebased

@rustbot label +T-libs-api
r? m-ou-se

@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 Feb 6, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 6, 2023
@tgross35
Copy link
Contributor Author

tgross35 commented Feb 6, 2023

@rustbot label -T-lib

I wish rustbot knew the difference between libs and libs-api

@tgross35 tgross35 mentioned this pull request Feb 6, 2023
6 tasks
@m-ou-se m-ou-se removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Feb 10, 2023
@m-ou-se
Copy link
Member

m-ou-se commented Feb 10, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 10, 2023

📌 Commit e79b3c2 has been approved by m-ou-se

It is now in the queue for this repository.

@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 Feb 10, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 10, 2023
 Rename atomic 'as_mut_ptr' to 'as_ptr' to match Cell (ref rust-lang#66893)

Originally discussed in rust-lang#66893 (comment)

~~This uses rust-lang#107706 as a base to avoid a merge conflict once that gets rolled up (so disregard const changes in the diff until it does)~~ all merged & rebased

`@rustbot` label +T-libs-api
r? m-ou-se
@tgross35
Copy link
Contributor Author

@rustbot ready

@m-ou-se I think I need a re-review since my last change to fix this build failure.

There might be other places that rely on this function, I'm not sure how to find them since they're not caught in the check.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2023
@Amanieu
Copy link
Member

Amanieu commented Feb 22, 2023

@bors r=m-ou-se

@bors
Copy link
Contributor

bors commented Feb 22, 2023

📌 Commit 787b111 has been approved by m-ou-se

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#107736 ( Rename atomic 'as_mut_ptr' to 'as_ptr' to match Cell (ref rust-lang#66893) )
 - rust-lang#108176 (Don't delay `ReError` bug during lexical region resolve)
 - rust-lang#108315 (Lint dead code in closures and generators)
 - rust-lang#108342 (apply query response: actually define opaque types)
 - rust-lang#108344 (Fix test filename for rust-lang#105700)
 - rust-lang#108353 (resolve: Remove `ImportResolver`)

Failed merges:

 - rust-lang#107911 (Add check for invalid #[macro_export] arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0982eab into rust-lang:master Feb 23, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 23, 2023
@tgross35 tgross35 deleted the atomic-as-ptr branch February 23, 2023 00:41
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2023
Stabilize `atomic_as_ptr`

Fixes rust-lang#66893

This stabilizes the `as_ptr` methods for atomics. The stabilization feature gate used here is `atomic_as_ptr` which supersedes `atomic_mut_ptr` to match the change in rust-lang#107736.

This needs FCP.

New stable API:

```rust
impl AtomicBool {
    pub const fn as_ptr(&self) -> *mut bool;
}

impl AtomicI32 {
    pub const fn as_ptr(&self) -> *mut i32;
}

// Includes all other atomic types

impl<T> AtomicPtr<T> {
    pub const fn as_ptr(&self) -> *mut *mut T;
}
```

r? libs-api
`@rustbot` label +needs-fcp
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2023
use `as_ptr` to determine the address of atomics

The PR rust-lang#107736 renamed  atomic `as_mut_ptr` to `as_ptr`. Consequently, the futex implementation of the tier-3 platform `RutyHermit` has to use this new interface. In addition, this PR removes also an unused import.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2023
Stabilize `atomic_as_ptr`

Fixes rust-lang#66893

This stabilizes the `as_ptr` methods for atomics. The stabilization feature gate used here is `atomic_as_ptr` which supersedes `atomic_mut_ptr` to match the change in rust-lang#107736.

This needs FCP.

New stable API:

```rust
impl AtomicBool {
    pub const fn as_ptr(&self) -> *mut bool;
}

impl AtomicI32 {
    pub const fn as_ptr(&self) -> *mut i32;
}

// Includes all other atomic types

impl<T> AtomicPtr<T> {
    pub const fn as_ptr(&self) -> *mut *mut T;
}
```

r? libs-api
``@rustbot`` label +needs-fcp
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2023
use `as_ptr` to determine the address of atomics

The PR rust-lang#107736 renamed  atomic `as_mut_ptr` to `as_ptr`. Consequently, the futex implementation of the tier-3 platform `RutyHermit` has to use this new interface. In addition, this PR removes also an unused import.
yvt added a commit to r3-os/r3 that referenced this pull request Mar 18, 2023
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request Jun 1, 2023
Stabilize `atomic_as_ptr`

Fixes #66893

This stabilizes the `as_ptr` methods for atomics. The stabilization feature gate used here is `atomic_as_ptr` which supersedes `atomic_mut_ptr` to match the change in rust-lang/rust#107736.

This needs FCP.

New stable API:

```rust
impl AtomicBool {
    pub const fn as_ptr(&self) -> *mut bool;
}

impl AtomicI32 {
    pub const fn as_ptr(&self) -> *mut i32;
}

// Includes all other atomic types

impl<T> AtomicPtr<T> {
    pub const fn as_ptr(&self) -> *mut *mut T;
}
```

r? libs-api
``@rustbot`` label +needs-fcp
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.

5 participants