about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-12 08:07:04 +0100
committerGitHub <noreply@github.com>2024-12-12 08:07:04 +0100
commit10556598e5cdf8f95733570c93073c4035fc4d8b (patch)
tree52d86f8cb29baef1c23e847ebbb6820822aa753a
parent90f6b27a9379a57a62194ada0e115bc07613c89b (diff)
parent6a8bc4bc6bcfa2f8d560ea3cb982dfbbd8a11cce (diff)
downloadrust-10556598e5cdf8f95733570c93073c4035fc4d8b.tar.gz
rust-10556598e5cdf8f95733570c93073c4035fc4d8b.zip
Rollup merge of #134179 - zachs18:align_offset_mut_ptr_doc, r=workingjubilee
Remove outdated consteval note from `<*mut T>::align_offset` docs.
-rw-r--r--library/core/src/ptr/mut_ptr.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs
index 6d0361b8c63..3639feaacf3 100644
--- a/library/core/src/ptr/mut_ptr.rs
+++ b/library/core/src/ptr/mut_ptr.rs
@@ -1587,15 +1587,6 @@ impl<T: ?Sized> *mut T {
     /// beyond the allocation that the pointer points into. It is up to the caller to ensure that
     /// the returned offset is correct in all terms other than alignment.
     ///
-    /// When this is called during compile-time evaluation (which is unstable), the implementation
-    /// may return `usize::MAX` in cases where that can never happen at runtime. This is because the
-    /// actual alignment of pointers is not known yet during compile-time, so an offset with
-    /// guaranteed alignment can sometimes not be computed. For example, a buffer declared as `[u8;
-    /// N]` might be allocated at an odd or an even address, but at compile-time this is not yet
-    /// known, so the execution has to be correct for either choice. It is therefore impossible to
-    /// find an offset that is guaranteed to be 2-aligned. (This behavior is subject to change, as usual
-    /// for unstable APIs.)
-    ///
     /// # Panics
     ///
     /// The function panics if `align` is not a power-of-two.