Skip to content

Commit 313f4de

Browse files
zachs18gitbot
authored and
gitbot
committed
Remove consteval note from <*mut T>::align_offset docs.
1 parent ce4bb95 commit 313f4de

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

core/src/ptr/mut_ptr.rs

-9
Original file line numberDiff line numberDiff line change
@@ -1587,15 +1587,6 @@ impl<T: ?Sized> *mut T {
15871587
/// beyond the allocation that the pointer points into. It is up to the caller to ensure that
15881588
/// the returned offset is correct in all terms other than alignment.
15891589
///
1590-
/// When this is called during compile-time evaluation (which is unstable), the implementation
1591-
/// may return `usize::MAX` in cases where that can never happen at runtime. This is because the
1592-
/// actual alignment of pointers is not known yet during compile-time, so an offset with
1593-
/// guaranteed alignment can sometimes not be computed. For example, a buffer declared as `[u8;
1594-
/// N]` might be allocated at an odd or an even address, but at compile-time this is not yet
1595-
/// known, so the execution has to be correct for either choice. It is therefore impossible to
1596-
/// find an offset that is guaranteed to be 2-aligned. (This behavior is subject to change, as usual
1597-
/// for unstable APIs.)
1598-
///
15991590
/// # Panics
16001591
///
16011592
/// The function panics if `align` is not a power-of-two.

0 commit comments

Comments
 (0)