Skip to content

Commit 8d7c414

Browse files
committed
Stabilize pointer_is_aligned
1 parent 001ea32 commit 8d7c414

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@
173173
#![feature(never_type)]
174174
#![feature(rustc_allow_const_fn_unstable)]
175175
#![feature(rustc_attrs)]
176-
#![feature(pointer_is_aligned)]
177176
#![feature(slice_internals)]
178177
#![feature(staged_api)]
179178
#![feature(stmt_expr_attributes)]

library/alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#![feature(const_str_from_utf8)]
3939
#![feature(nonnull_slice_from_raw_parts)]
4040
#![feature(panic_update_hook)]
41-
#![feature(pointer_is_aligned)]
4241
#![feature(slice_flatten)]
4342
#![feature(thin_box)]
4443
#![feature(bench_black_box)]

library/core/src/ptr/const_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ impl<T: ?Sized> *const T {
13351335
/// Returns whether the pointer is properly aligned for `T`.
13361336
#[must_use]
13371337
#[inline]
1338-
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
1338+
#[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")]
13391339
pub fn is_aligned(self) -> bool
13401340
where
13411341
T: Sized,
@@ -1353,7 +1353,7 @@ impl<T: ?Sized> *const T {
13531353
/// The function panics if `align` is not a power-of-two (this includes 0).
13541354
#[must_use]
13551355
#[inline]
1356-
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
1356+
#[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")]
13571357
pub fn is_aligned_to(self, align: usize) -> bool {
13581358
if !align.is_power_of_two() {
13591359
panic!("is_aligned_to: align is not a power-of-two");

library/core/src/ptr/mut_ptr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ impl<T: ?Sized> *mut T {
16151615
/// Returns whether the pointer is properly aligned for `T`.
16161616
#[must_use]
16171617
#[inline]
1618-
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
1618+
#[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")]
16191619
pub fn is_aligned(self) -> bool
16201620
where
16211621
T: Sized,
@@ -1633,7 +1633,7 @@ impl<T: ?Sized> *mut T {
16331633
/// The function panics if `align` is not a power-of-two (this includes 0).
16341634
#[must_use]
16351635
#[inline]
1636-
#[unstable(feature = "pointer_is_aligned", issue = "96284")]
1636+
#[stable(feature = "pointer_is_aligned", since = "CURRENT_RUSTC_VERSION")]
16371637
pub fn is_aligned_to(self, align: usize) -> bool {
16381638
if !align.is_power_of_two() {
16391639
panic!("is_aligned_to: align is not a power-of-two");

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@
301301
#![feature(panic_can_unwind)]
302302
#![feature(panic_info_message)]
303303
#![feature(panic_internals)]
304-
#![feature(pointer_is_aligned)]
305304
#![feature(portable_simd)]
306305
#![feature(prelude_2024)]
307306
#![feature(provide_any)]

0 commit comments

Comments
 (0)