diff options
| author | bors <bors@rust-lang.org> | 2023-02-07 17:19:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-07 17:19:47 +0000 |
| commit | bd39bbb4bb92df439bf6d85470e296cc6a47ffbd (patch) | |
| tree | 85aea0de5df7a2c14f4c66e00891ae14a356d966 /library/core/src | |
| parent | 5dd0e1b7ae7bcddce28658487602e8a077737a3e (diff) | |
| parent | 0e3af6af4708b38065688c6bc4462a916083aff7 (diff) | |
| download | rust-bd39bbb4bb92df439bf6d85470e296cc6a47ffbd.tar.gz rust-bd39bbb4bb92df439bf6d85470e296cc6a47ffbd.zip | |
Auto merge of #107767 - matthiaskrgr:rollup-9m1qfso, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #100599 (Add compiler error E0523 long description and test) - #107471 (rustdoc: do not include empty default-settings tag in HTML) - #107555 (Modify existing bounds if they exist) - #107662 (Turn projections into copies in CopyProp.) - #107695 (Add test for Future inflating arg size to 3x ) - #107700 (Run the tools builder on all PRs) - #107706 (Mark 'atomic_mut_ptr' methods const) - #107709 (Fix problem noticed in PR106859 with char -> u8 suggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/sync/atomic.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 818721062d7..1d14efc7523 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -928,8 +928,8 @@ impl AtomicBool { /// ``` #[inline] #[unstable(feature = "atomic_mut_ptr", reason = "recently added", issue = "66893")] - pub fn as_mut_ptr(&self) -> *mut bool { - self.v.get() as *mut bool + pub const fn as_mut_ptr(&self) -> *mut bool { + self.v.get().cast() } /// Fetches the value, and applies a function to it that returns an optional @@ -1803,7 +1803,7 @@ impl<T> AtomicPtr<T> { /// /// ```ignore (extern-declaration) /// #![feature(atomic_mut_ptr)] - //// use std::sync::atomic::AtomicPtr; + /// use std::sync::atomic::AtomicPtr; /// /// extern "C" { /// fn my_atomic_op(arg: *mut *mut u32); @@ -1819,7 +1819,7 @@ impl<T> AtomicPtr<T> { /// ``` #[inline] #[unstable(feature = "atomic_mut_ptr", reason = "recently added", issue = "66893")] - pub fn as_mut_ptr(&self) -> *mut *mut T { + pub const fn as_mut_ptr(&self) -> *mut *mut T { self.p.get() } } @@ -2727,7 +2727,7 @@ macro_rules! atomic_int { #[unstable(feature = "atomic_mut_ptr", reason = "recently added", issue = "66893")] - pub fn as_mut_ptr(&self) -> *mut $int_type { + pub const fn as_mut_ptr(&self) -> *mut $int_type { self.v.get() } } |
