Skip to content

Commit 8b59515

Browse files
committed
stabilize ptr_offset_from
1 parent dd31e91 commit 8b59515

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
#![feature(or_patterns)]
114114
#![feature(pattern)]
115115
#![feature(ptr_internals)]
116-
#![feature(ptr_offset_from)]
117116
#![feature(raw_ref_op)]
118117
#![feature(rustc_attrs)]
119118
#![feature(receiver_trait)]

core/src/ptr/const_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl<T: ?Sized> *const T {
370370
/// let zero = ptr2_other.offset_from(ptr2); // Undefined Behavior
371371
/// }
372372
/// ```
373-
#[unstable(feature = "ptr_offset_from", issue = "41079")]
373+
#[stable(feature = "ptr_offset_from", since = "1.46.0")]
374374
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
375375
#[inline]
376376
pub const unsafe fn offset_from(self, origin: *const T) -> isize

core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl<T: ?Sized> *mut T {
541541
/// let zero = ptr2_other.offset_from(ptr2); // Undefined Behavior
542542
/// }
543543
/// ```
544-
#[unstable(feature = "ptr_offset_from", issue = "41079")]
544+
#[stable(feature = "ptr_offset_from", since = "1.46.0")]
545545
#[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
546546
#[inline]
547547
pub const unsafe fn offset_from(self, origin: *const T) -> isize

0 commit comments

Comments
 (0)