diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-03-11 03:47:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-11 03:47:18 -0400 |
| commit | 6c8c272ad4211853b2b7fe97edebf1e5fa2095bb (patch) | |
| tree | 43d9c4e4d3c161daa83d4f1cc2183bde47cfb5e3 /library/alloc | |
| parent | a6d93acf5fdeb020ab86cc0d30d5672c23a7dba6 (diff) | |
| parent | 290cbdf50ed7aa856a6794178500c7bd76fc7ec9 (diff) | |
| download | rust-6c8c272ad4211853b2b7fe97edebf1e5fa2095bb.tar.gz rust-6c8c272ad4211853b2b7fe97edebf1e5fa2095bb.zip | |
Rollup merge of #121148 - clarfonthey:try-range, r=dtolnay
Add slice::try_range This adds a fallible version of the unstable `slice::range` (tracking: #76393) which is highly requested in the tracking issue. Hoping this can slide by without an ACP (since the feature is already being tracked), but let me know otherwise.
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/slice.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index f4e392760c8..21d5dce04a0 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -33,8 +33,6 @@ use crate::vec::Vec; #[cfg(test)] mod tests; -#[unstable(feature = "slice_range", issue = "76393")] -pub use core::slice::range; #[unstable(feature = "array_chunks", issue = "74985")] pub use core::slice::ArrayChunks; #[unstable(feature = "array_chunks", issue = "74985")] @@ -51,6 +49,8 @@ pub use core::slice::{from_mut, from_ref}; pub use core::slice::{from_mut_ptr_range, from_ptr_range}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{from_raw_parts, from_raw_parts_mut}; +#[unstable(feature = "slice_range", issue = "76393")] +pub use core::slice::{range, try_range}; #[stable(feature = "slice_group_by", since = "1.77.0")] pub use core::slice::{ChunkBy, ChunkByMut}; #[stable(feature = "rust1", since = "1.0.0")] |
