Feature gate: #![feature(range_bounds_is_empty)]
This is a tracking issue for the is_empty method on RangeBounds.
Public API
// core::ops
pub trait RangeBounds<T: ?Sized> {
...
fn is_empty(&self) -> bool
where
T: PartialOrd,
{
...
}
}
Steps / History
Unresolved Questions
(Excluded(1), Excluded(2)) is considered to be non-empty. This could be a foot gun. Should we add a trait bound to avoid it? Related issues:
Feature gate:
#![feature(range_bounds_is_empty)]This is a tracking issue for the
is_emptymethod onRangeBounds.Public API
Steps / History
IntoBounds::clampandRangeBounds::is_emptylibs-team#539IntoBounds::intersectandRangeBounds::is_empty#137304Unresolved Questions
(Excluded(1), Excluded(2))is considered to be non-empty. This could be a foot gun. Should we add a trait bound to avoid it? Related issues:RangeBounds::is_emptyhas a nonsensical implementation #149625IntoBounds::clampandRangeBounds::is_emptylibs-team#539Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩