File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2053,6 +2053,8 @@ impl<T: ?Sized> UnsafeCell<T> {
2053
2053
///
2054
2054
/// let m = MaybeUninit::<UnsafeCell<i32>>::uninit();
2055
2055
/// unsafe { UnsafeCell::raw_get(m.as_ptr()).write(5); }
2056
+ /// // avoid below which references to uninitialized data
2057
+ /// // unsafe { UnsafeCell::get(&*m.as_ptr()).write(5); }
2056
2058
/// let uc = unsafe { m.assume_init() };
2057
2059
///
2058
2060
/// assert_eq!(uc.into_inner(), 5);
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ impl<'a> PanicInfo<'a> {
138
138
/// whose ABI does not support unwinding.
139
139
///
140
140
/// It is safe for a panic handler to unwind even when this function returns
141
- /// true , however this will simply cause the panic handler to be called
141
+ /// false , however this will simply cause the panic handler to be called
142
142
/// again.
143
143
#[ must_use]
144
144
#[ unstable( feature = "panic_can_unwind" , issue = "92988" ) ]
You can’t perform that action at this time.
0 commit comments