Skip to content

Commit dc37ed8

Browse files
bors[bot]Stjepan Glavina
and
Stjepan Glavina
committed
Merge #332
332: Deprecate AtomicCell::get_mut r=stjepang a=stjepang This is an essential step in solving #315 - there is no way to make `AtomicCell::get_mut()` sound, unfortunately. Let's deprecate it and remove in the next release. Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2 parents 876c9cc + 2532e0d commit dc37ed8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crossbeam-utils/src/atomic/atomic_cell.rs

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ impl<T> AtomicCell<T> {
5757
///
5858
/// assert_eq!(a.load(), 8);
5959
/// ```
60+
#[doc(hidden)]
61+
#[deprecated(note = "this method is unsound and will be removed in the next release")]
6062
pub fn get_mut(&mut self) -> &mut T {
6163
unsafe { &mut *self.value.get() }
6264
}

0 commit comments

Comments
 (0)