Skip to content

Commit 1055659

Browse files
authored
Rollup merge of #134179 - zachs18:align_offset_mut_ptr_doc, r=workingjubilee
Remove outdated consteval note from `<*mut T>::align_offset` docs.
2 parents 90f6b27 + 6a8bc4b commit 1055659

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Diff for: library/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)