File tree 1 file changed +0
-2
lines changed
1 file changed +0
-2
lines changed Original file line number Diff line number Diff line change @@ -1387,7 +1387,6 @@ pub const unsafe fn read<T>(src: *const T) -> T {
1387
1387
1388
1388
// SAFETY: the caller must guarantee that `src` is valid for reads.
1389
1389
unsafe {
1390
- #[ cfg( debug_assertions) ] // Too expensive to always enable (for now?)
1391
1390
ub_checks:: assert_unsafe_precondition!(
1392
1391
check_language_ub,
1393
1392
"ptr::read requires that the pointer argument is aligned and non-null" ,
@@ -1596,7 +1595,6 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
1596
1595
// `dst` cannot overlap `src` because the caller has mutable access
1597
1596
// to `dst` while `src` is owned by this function.
1598
1597
unsafe {
1599
- #[ cfg( debug_assertions) ] // Too expensive to always enable (for now?)
1600
1598
ub_checks:: assert_unsafe_precondition!(
1601
1599
check_language_ub,
1602
1600
"ptr::write requires that the pointer argument is aligned and non-null" ,
You can’t perform that action at this time.
0 commit comments