File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ impl AsciiChar {
506
506
pub const unsafe fn digit_unchecked ( d : u8 ) -> Self {
507
507
assert_unsafe_precondition ! (
508
508
check_language_ub,
509
- "`AsciiChar ::digit_unchecked` input cannot exceed 9." ,
509
+ "`ascii::Char ::digit_unchecked` input cannot exceed 9." ,
510
510
( d: u8 = d) => d < 10
511
511
) ;
512
512
Original file line number Diff line number Diff line change @@ -1432,7 +1432,8 @@ pub const unsafe fn read<T>(src: *const T) -> T {
1432
1432
(
1433
1433
addr: * const ( ) = src as * const ( ) ,
1434
1434
align: usize = align_of:: <T >( ) ,
1435
- ) => ub_checks:: is_aligned_and_not_null( addr, align)
1435
+ is_zst: bool = T :: IS_ZST ,
1436
+ ) => ub_checks:: is_aligned_and_not_null( addr, align, is_zst)
1436
1437
) ;
1437
1438
crate :: intrinsics:: read_via_copy ( src)
1438
1439
}
@@ -1637,7 +1638,8 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
1637
1638
(
1638
1639
addr: * mut ( ) = dst as * mut ( ) ,
1639
1640
align: usize = align_of:: <T >( ) ,
1640
- ) => ub_checks:: is_aligned_and_not_null( addr, align)
1641
+ is_zst: bool = T :: IS_ZST ,
1642
+ ) => ub_checks:: is_aligned_and_not_null( addr, align, is_zst)
1641
1643
) ;
1642
1644
intrinsics:: write_via_move ( dst, src)
1643
1645
}
You can’t perform that action at this time.
0 commit comments