Skip to content

Commit 29a19a8

Browse files
committed
add new_range_api for RFC 3550
This includes a `From<legacy::RangeInclusive> for RangeInclusive` impl for convenience, instead of the `TryFrom` impl from the RFC. Having `From` is highly convenient and the debug assert should find almost all misuses. This includes re-exports of all existing `Range` types under `core::range`, plus the range-related traits (`RangeBounds`, `Step`, `OneSidedRange`) and the `Bound` enum. Currently the iterators are just wrappers around the old range types.
1 parent 274499d commit 29a19a8

File tree

8 files changed

+1429
-5
lines changed

8 files changed

+1429
-5
lines changed

library/core/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ pub mod panicking;
403403
#[unstable(feature = "core_pattern_types", issue = "none")]
404404
pub mod pat;
405405
pub mod pin;
406+
#[unstable(feature = "new_range_api", issue = "125687")]
407+
pub mod range;
406408
pub mod result;
407409
pub mod sync;
408410

0 commit comments

Comments
 (0)