Feature gate: #![feature(new_range_end_bound)]
This is a tracking issue for rust-lang/libs-team#653
Public API
Before
// core::range
struct RangeInclusive<T>;
struct Range<T>;
// core::ops
trait RangeBounds<T: ?Sized> {
fn start_bound(&self) -> Bound<&T>;
fn end_bound(&self) -> Bound<&T>;
}
After
// core::range
struct RangeInclusive<Start, End = Start>;
struct Range<Start, End = Start>;
// core::ops
trait RangeBounds<Start: ?Sized, End: ?Sized = Start> {
fn start_bound(&self) -> Bound<&Start>;
fn end_bound(&self) -> Bound<&End>;
}
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
Unresolved Questions
Feature gate:
#![feature(new_range_end_bound)]This is a tracking issue for rust-lang/libs-team#653
Public API
Before
After
Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)RangeBounds<Start, End = Start>and all existing range types libs-team#653 (comment)Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩