Skip to content

Commit f54c303

Browse files
committed
Override more
1 parent a8da757 commit f54c303

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

compiler/rustc_span/src/lib.rs

+21-1
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,16 @@ macro_rules! impl_pos {
18911891
fn cmp(&self, other: &Self) -> ::std::cmp::Ordering {
18921892
self.0.cmp(&other.0)
18931893
}
1894+
1895+
#[inline(always)]
1896+
fn min(self, other: Self) -> Self {
1897+
Self(self.0.min(other.0))
1898+
}
1899+
1900+
#[inline(always)]
1901+
fn max(self, other: Self) -> Self {
1902+
Self(self.0.max(other.0))
1903+
}
18941904
}
18951905

18961906
impl ::std::cmp::PartialOrd for $ident {
@@ -1908,7 +1918,17 @@ macro_rules! impl_pos {
19081918
fn le(&self, other: &Self) -> bool {
19091919
self.0.le(&other.0)
19101920
}
1911-
}
1921+
1922+
#[inline(always)]
1923+
fn gt(&self, other: &Self) -> bool {
1924+
self.0.gt(&other.0)
1925+
}
1926+
1927+
#[inline(always)]
1928+
fn ge(&self, other: &Self) -> bool {
1929+
self.0.ge(&other.0)
1930+
}
1931+
}
19121932

19131933
impl Pos for $ident {
19141934
#[inline(always)]

0 commit comments

Comments
 (0)