@@ -1813,12 +1813,11 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
18131813 unsafe {
18141814 ub_checks:: assert_unsafe_precondition!(
18151815 check_language_ub,
1816- "ptr::read_volatile requires that the pointer argument is aligned and non-null " ,
1816+ "ptr::read_volatile requires that the pointer argument is aligned" ,
18171817 (
18181818 addr: * const ( ) = src as * const ( ) ,
18191819 align: usize = align_of:: <T >( ) ,
1820- is_zst: bool = T :: IS_ZST ,
1821- ) => ub_checks:: maybe_is_aligned_and_not_null( addr, align, is_zst)
1820+ ) => ub_checks:: maybe_is_aligned( addr, align)
18221821 ) ;
18231822 intrinsics:: volatile_load ( src)
18241823 }
@@ -1893,12 +1892,11 @@ pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
18931892 unsafe {
18941893 ub_checks:: assert_unsafe_precondition!(
18951894 check_language_ub,
1896- "ptr::write_volatile requires that the pointer argument is aligned and non-null " ,
1895+ "ptr::write_volatile requires that the pointer argument is aligned" ,
18971896 (
18981897 addr: * mut ( ) = dst as * mut ( ) ,
18991898 align: usize = align_of:: <T >( ) ,
1900- is_zst: bool = T :: IS_ZST ,
1901- ) => ub_checks:: maybe_is_aligned_and_not_null( addr, align, is_zst)
1899+ ) => ub_checks:: maybe_is_aligned( addr, align)
19021900 ) ;
19031901 intrinsics:: volatile_store ( dst, src) ;
19041902 }
0 commit comments