File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 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> {
20532053 ///
20542054 /// let m = MaybeUninit::<UnsafeCell<i32>>::uninit();
20552055 /// 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); }
20562058 /// let uc = unsafe { m.assume_init() };
20572059 ///
20582060 /// assert_eq!(uc.into_inner(), 5);
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ impl<'a> PanicInfo<'a> {
138138 /// whose ABI does not support unwinding.
139139 ///
140140 /// 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
142142 /// again.
143143 #[ must_use]
144144 #[ unstable( feature = "panic_can_unwind" , issue = "92988" ) ]
You can’t perform that action at this time.
0 commit comments