X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Falloc%2Fsrc%2Frc.rs;h=fd1e3e0f75b09a68ca2531423d361878bf8cfcf6;hb=dc3e59cb3fe05ebd752d3a2269f501c00327be22;hp=c1d853ed652160149e6911c5577e8cc93891f1a9;hpb=6d8ac8389ead2869e756d4ed1a6ea929f16f1820;p=rust.git diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index c1d853ed652..fd1e3e0f75b 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -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`. @@ -2179,7 +2179,7 @@ pub struct Weak { // This is a `NonNull` to allow optimizing the size of this type in enums, // but it is not necessarily a valid pointer. // `Weak::new` sets this to `usize::MAX` so that it doesn’t need - // to allocate space on the heap. That's not a value a real pointer + // to allocate space on the heap. That's not a value a real pointer // will ever have because RcBox has alignment at least 2. // This is only possible when `T: Sized`; unsized `T` never dangle. ptr: NonNull>,