File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1572,18 +1572,18 @@ impl<T: ?Sized> UnsafeCell<T> {
15721572 /// use std::mem::MaybeUninit;
15731573 ///
15741574 /// let m = MaybeUninit::<UnsafeCell<i32>>::uninit();
1575- /// unsafe { m.as_ptr().raw_get( ).write(5); }
1575+ /// unsafe { UnsafeCell::raw_get( m.as_ptr()).write(5); }
15761576 /// let uc = unsafe { m.assume_init() };
15771577 ///
15781578 /// assert_eq!(uc.into_inner(), 5);
15791579 /// ```
15801580 #[ inline]
15811581 #[ unstable( feature = "unsafe_cell_raw_get" , issue = "66358" ) ]
1582- pub const fn raw_get ( self : * const Self ) -> * mut T {
1582+ pub const fn raw_get ( this : * const Self ) -> * mut T {
15831583 // We can just cast the pointer from `UnsafeCell<T>` to `T` because of
15841584 // #[repr(transparent)]. This exploits libstd's special status, there is
15851585 // no guarantee for user code that this will work in future versions of the compiler!
1586- self as * const T as * mut T
1586+ this as * const T as * mut T
15871587 }
15881588}
15891589
You can’t perform that action at this time.
0 commit comments