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 @@ -2100,6 +2100,8 @@ impl<T: ?Sized> UnsafeCell<T> {
21002100 ///
21012101 /// let m = MaybeUninit::<UnsafeCell<i32>>::uninit();
21022102 /// unsafe { UnsafeCell::raw_get(m.as_ptr()).write(5); }
2103+ /// // avoid below which references to uninitialized data
2104+ /// // unsafe { UnsafeCell::get(&*m.as_ptr()).write(5); }
21032105 /// let uc = unsafe { m.assume_init() };
21042106 ///
21052107 /// assert_eq!(uc.into_inner(), 5);
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ impl<'a> PanicInfo<'a> {
134134 /// whose ABI does not support unwinding.
135135 ///
136136 /// It is safe for a panic handler to unwind even when this function returns
137- /// true , however this will simply cause the panic handler to be called
137+ /// false , however this will simply cause the panic handler to be called
138138 /// again.
139139 #[ must_use]
140140 #[ unstable( feature = "panic_can_unwind" , issue = "92988" ) ]
You can’t perform that action at this time.
0 commit comments