mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #107452 - y21:get-mut-unchecked-typo, r=Mark-Simulacrum
Fix typo in `{Rc, Arc}::get_mut_unchecked` docs
Just a correction in the documentation of `{Rc, Arc}::get_mut_unchecked`.
This commit is contained in:
@@ -1092,7 +1092,7 @@ pub fn get_mut(this: &mut Self) -> Option<&mut T> {
|
||||
/// # Safety
|
||||
///
|
||||
/// If any other `Rc` or [`Weak`] pointers to the same allocation exist, then
|
||||
/// they must be must not be dereferenced or have active borrows for the duration
|
||||
/// they must not be dereferenced or have active borrows for the duration
|
||||
/// of the returned borrow, and their inner type must be exactly the same as the
|
||||
/// inner type of this Rc (including lifetimes). This is trivially the case if no
|
||||
/// such pointers exist, for example immediately after `Rc::new`.
|
||||
|
||||
@@ -1733,7 +1733,7 @@ pub fn get_mut(this: &mut Self) -> Option<&mut T> {
|
||||
/// # Safety
|
||||
///
|
||||
/// If any other `Arc` or [`Weak`] pointers to the same allocation exist, then
|
||||
/// they must be must not be dereferenced or have active borrows for the duration
|
||||
/// they must not be dereferenced or have active borrows for the duration
|
||||
/// of the returned borrow, and their inner type must be exactly the same as the
|
||||
/// inner type of this Rc (including lifetimes). This is trivially the case if no
|
||||
/// such pointers exist, for example immediately after `Arc::new`.
|
||||
|
||||
Reference in New Issue
Block a user