Skip to content

Commit

Permalink
Rollup merge of rust-lang#77111 - fusion-engineering-forks:stabilize-…
Browse files Browse the repository at this point in the history
…slice-ptr-range, r=dtolnay

Stabilize slice_ptr_range.

This has been unstable for almost a year now. Time to stabilize?

Closes rust-lang#65807.

@rustbot modify labels: +T-libs +A-raw-pointers +A-slice +needs-fcp
  • Loading branch information
Dylan-DPC authored Oct 1, 2020
2 parents d2e06b7 + f289468 commit bf59451
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,6 @@ impl<T> [T] {
/// element of this slice:
///
/// ```
/// #![feature(slice_ptr_range)]
///
/// let a = [1, 2, 3];
/// let x = &a[1] as *const _;
/// let y = &5 as *const _;
Expand All @@ -469,7 +467,7 @@ impl<T> [T] {
/// ```
///
/// [`as_ptr`]: #method.as_ptr
#[unstable(feature = "slice_ptr_range", issue = "65807")]
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[inline]
pub const fn as_ptr_range(&self) -> Range<*const T> {
Expand Down Expand Up @@ -511,7 +509,7 @@ impl<T> [T] {
/// common in C++.
///
/// [`as_mut_ptr`]: #method.as_mut_ptr
#[unstable(feature = "slice_ptr_range", issue = "65807")]
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
#[rustc_const_unstable(feature = "const_ptr_offset", issue = "71499")]
#[inline]
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
Expand Down

0 comments on commit bf59451

Please sign in to comment.