Constify RangeBounds, RangeX::contains and RangeX::is_empty.

This commit is contained in:
onestacked
2023-02-15 15:49:17 +01:00
parent 999ac5f777
commit a14a4fc3d0
2 changed files with 63 additions and 40 deletions

View File

@@ -1491,9 +1491,10 @@ mod impls {
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<A: ?Sized, B: ?Sized> PartialOrd<&B> for &A
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
impl<A: ?Sized, B: ?Sized> const PartialOrd<&B> for &A
where
A: PartialOrd<B>,
A: ~const PartialOrd<B>,
{
#[inline]
fn partial_cmp(&self, other: &&B) -> Option<Ordering> {