Tracking Issue for SyncUnsafeCell · Issue #95439 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@m-ou-se

Description

@m-ou-se

Feature gate: #![feature(sync_unsafe_cell)]

This is a tracking issue for SyncUnsafeCell.

Public API

// core::cell

#[repr(transparent)] pub struct SyncUnsafeCell<T: ?Sized> { value: UnsafeCell, }

unsafe impl<T: ?Sized + Sync> Sync for SyncUnsafeCell {}

// Identical interface as UnsafeCell:

impl SyncUnsafeCell { pub const fn new(value: T) -> Self; pub const fn into_inner(self) -> T; }

impl<T: ?Sized> SyncUnsafeCell { pub const fn get(&self) -> *mut T; pub const fn get_mut(&mut self) -> &mut T; pub const fn raw_get(this: *const Self) -> *mut T; }

impl From for SyncUnsafeCell; impl<T: Default> Default for SyncUnsafeCell; impl<T: ?Sized> Debug for SyncUnsafeCell;

Steps / History

Unresolved Questions