Skip to content

Commit 597f432

Browse files
committed
Auto merge of #60303 - CryZe:patch-6, r=Centril
Stabilize pointer::align_offset Closes #44488
2 parents 3ee9363 + cf9d667 commit 597f432

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/libcore/ptr.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,6 @@ impl<T: ?Sized> *const T {
15401540
/// Accessing adjacent `u8` as `u16`
15411541
///
15421542
/// ```
1543-
/// # #![feature(align_offset)]
15441543
/// # fn foo(n: usize) {
15451544
/// # use std::mem::align_of;
15461545
/// # unsafe {
@@ -1556,7 +1555,7 @@ impl<T: ?Sized> *const T {
15561555
/// }
15571556
/// # } }
15581557
/// ```
1559-
#[unstable(feature = "align_offset", issue = "44488")]
1558+
#[stable(feature = "align_offset", since = "1.36.0")]
15601559
pub fn align_offset(self, align: usize) -> usize where T: Sized {
15611560
if !align.is_power_of_two() {
15621561
panic!("align_offset: align is not a power-of-two");
@@ -2312,7 +2311,6 @@ impl<T: ?Sized> *mut T {
23122311
/// Accessing adjacent `u8` as `u16`
23132312
///
23142313
/// ```
2315-
/// # #![feature(align_offset)]
23162314
/// # fn foo(n: usize) {
23172315
/// # use std::mem::align_of;
23182316
/// # unsafe {
@@ -2328,7 +2326,7 @@ impl<T: ?Sized> *mut T {
23282326
/// }
23292327
/// # } }
23302328
/// ```
2331-
#[unstable(feature = "align_offset", issue = "44488")]
2329+
#[stable(feature = "align_offset", since = "1.36.0")]
23322330
pub fn align_offset(self, align: usize) -> usize where T: Sized {
23332331
if !align.is_power_of_two() {
23342332
panic!("align_offset: align is not a power-of-two");

src/libcore/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#![feature(test)]
2727
#![feature(trusted_len)]
2828
#![feature(try_trait)]
29-
#![feature(align_offset)]
3029
#![feature(reverse_bits)]
3130
#![feature(inner_deref)]
3231
#![feature(slice_internals)]

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
// std is implemented with unstable features, many of which are internal
228228
// compiler details that will never be stable
229229
// NB: the following list is sorted to minimize merge conflicts.
230-
#![feature(align_offset)]
231230
#![feature(alloc_error_handler)]
232231
#![feature(alloc_layout_extra)]
233232
#![feature(allocator_api)]

0 commit comments

Comments
 (0)