mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
docs: Improve descriptions for some methods in core::cell.
This commit is contained in:
parent
c3d60aba6c
commit
0d80b2a041
|
@ -212,7 +212,7 @@ pub fn set(&self, value: T) {
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets a reference to the underlying `UnsafeCell`.
|
||||
/// Returns a reference to the underlying `UnsafeCell`.
|
||||
///
|
||||
/// # Unsafety
|
||||
///
|
||||
|
@ -439,7 +439,7 @@ pub fn borrow_mut<'a>(&'a self) -> RefMut<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Gets a reference to the underlying `UnsafeCell`.
|
||||
/// Returns a reference to the underlying `UnsafeCell`.
|
||||
///
|
||||
/// This can be used to circumvent `RefCell`'s safety checks.
|
||||
///
|
||||
|
@ -671,8 +671,8 @@ pub fn new(value: T) -> UnsafeCell<T> {
|
|||
///
|
||||
/// # Unsafety
|
||||
///
|
||||
/// This function is unsafe because there is no guarantee that this or other threads are
|
||||
/// currently inspecting the inner value.
|
||||
/// This function is unsafe because this thread or another thread may currently be
|
||||
/// inspecting the inner value.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue