File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1628,12 +1628,12 @@ impl<T: ?Sized> *const T {
16281628 #[ inline]
16291629 const fn const_impl ( ptr : * const ( ) , align : usize ) -> bool {
16301630 // We can't use the address of `self` in a `const fn`, so we use `align_offset` instead.
1631- // The cast to `()` is used to
1632- // 1. deal with fat pointers; and
1633- // 2. ensure that `align_offset` doesn't actually try to compute an offset.
16341631 ptr. align_offset ( align) == 0
16351632 }
16361633
1634+ // The cast to `()` is used to
1635+ // 1. deal with fat pointers; and
1636+ // 2. ensure that `align_offset` (in `const_impl`) doesn't actually try to compute an offset.
16371637 #[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ] // on bootstrap bump, remove unsafe block
16381638 // SAFETY: The two versions are equivalent at runtime.
16391639 unsafe {
Original file line number Diff line number Diff line change @@ -1900,12 +1900,12 @@ impl<T: ?Sized> *mut T {
19001900 #[ inline]
19011901 const fn const_impl ( ptr : * mut ( ) , align : usize ) -> bool {
19021902 // We can't use the address of `self` in a `const fn`, so we use `align_offset` instead.
1903- // The cast to `()` is used to
1904- // 1. deal with fat pointers; and
1905- // 2. ensure that `align_offset` doesn't actually try to compute an offset.
19061903 ptr. align_offset ( align) == 0
19071904 }
19081905
1906+ // The cast to `()` is used to
1907+ // 1. deal with fat pointers; and
1908+ // 2. ensure that `align_offset` (in `const_impl`) doesn't actually try to compute an offset.
19091909 #[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ] // on bootstrap bump, remove unsafe block
19101910 // SAFETY: The two versions are equivalent at runtime.
19111911 unsafe {
You can’t perform that action at this time.
0 commit comments