Skip to content

Commit c052998

Browse files
committed
Add get_mut
1 parent 9bdd397 commit c052998

File tree

1 file changed

+5
-0
lines changed
  • src/librustc_data_structures

1 file changed

+5
-0
lines changed

src/librustc_data_structures/sync.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ cfg_if! {
7777
pub fn new(v: T) -> Self {
7878
AtomicCell(Cell::new(v))
7979
}
80+
81+
#[inline]
82+
pub fn get_mut(&mut self) -> &mut T {
83+
self.0.get_mut()
84+
}
8085
}
8186

8287
impl<T: Copy> AtomicCell<T> {

0 commit comments

Comments
 (0)