File tree 2 files changed +6
-6
lines changed
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 {
1628
1628
#[ inline]
1629
1629
const fn const_impl ( ptr : * const ( ) , align : usize ) -> bool {
1630
1630
// 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.
1634
1631
ptr. align_offset ( align) == 0
1635
1632
}
1636
1633
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.
1637
1637
#[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ] // on bootstrap bump, remove unsafe block
1638
1638
// SAFETY: The two versions are equivalent at runtime.
1639
1639
unsafe {
Original file line number Diff line number Diff line change @@ -1900,12 +1900,12 @@ impl<T: ?Sized> *mut T {
1900
1900
#[ inline]
1901
1901
const fn const_impl ( ptr : * mut ( ) , align : usize ) -> bool {
1902
1902
// 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.
1906
1903
ptr. align_offset ( align) == 0
1907
1904
}
1908
1905
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.
1909
1909
#[ cfg_attr( not( bootstrap) , allow( unused_unsafe) ) ] // on bootstrap bump, remove unsafe block
1910
1910
// SAFETY: The two versions are equivalent at runtime.
1911
1911
unsafe {
You can’t perform that action at this time.
0 commit comments