File tree 1 file changed +3
-3
lines changed
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> {
1572
1572
/// use std::mem::MaybeUninit;
1573
1573
///
1574
1574
/// 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); }
1576
1576
/// let uc = unsafe { m.assume_init() };
1577
1577
///
1578
1578
/// assert_eq!(uc.into_inner(), 5);
1579
1579
/// ```
1580
1580
#[ inline]
1581
1581
#[ 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 {
1583
1583
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
1584
1584
// #[repr(transparent)]. This exploits libstd's special status, there is
1585
1585
// 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
1587
1587
}
1588
1588
}
1589
1589
You can’t perform that action at this time.
0 commit comments