Skip to content

Commit 8dddccc

Browse files
committed
---
yaml --- r: 275147 b: refs/heads/stable c: ccad544 h: refs/heads/master i: 275145: eea000f 275143: 3e775be
1 parent 17b25ad commit 8dddccc

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 27be4336d9dc0a829ca3c19e8b08a404b11b359d
32+
refs/heads/stable: ccad5449ff11b07368a30a7d843cc6ce57fdd0aa
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libstd/path.rs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ impl<'a> IntoIterator for &'a Path {
20512051
fn into_iter(self) -> Iter<'a> { self.iter() }
20522052
}
20532053

2054-
macro_rules! impl_eq {
2054+
macro_rules! impl_cmp {
20552055
($lhs:ty, $rhs: ty) => {
20562056
#[stable(feature = "partialeq_path", since = "1.6.0")]
20572057
impl<'a, 'b> PartialEq<$rhs> for $lhs {
@@ -2065,14 +2065,29 @@ macro_rules! impl_eq {
20652065
fn eq(&self, other: &$lhs) -> bool { <Path as PartialEq>::eq(self, other) }
20662066
}
20672067

2068+
#[stable(feature = "cmp_path", since = "1.8.0")]
2069+
impl<'a, 'b> PartialOrd<$rhs> for $lhs {
2070+
#[inline]
2071+
fn partial_cmp(&self, other: &$rhs) -> Option<cmp::Ordering> {
2072+
<Path as PartialOrd>::partial_cmp(self, other)
2073+
}
2074+
}
2075+
2076+
#[stable(feature = "cmp_path", since = "1.8.0")]
2077+
impl<'a, 'b> PartialOrd<$lhs> for $rhs {
2078+
#[inline]
2079+
fn partial_cmp(&self, other: &$lhs) -> Option<cmp::Ordering> {
2080+
<Path as PartialOrd>::partial_cmp(self, other)
2081+
}
2082+
}
20682083
}
20692084
}
20702085

2071-
impl_eq!(PathBuf, Path);
2072-
impl_eq!(PathBuf, &'a Path);
2073-
impl_eq!(Cow<'a, Path>, Path);
2074-
impl_eq!(Cow<'a, Path>, &'b Path);
2075-
impl_eq!(Cow<'a, Path>, PathBuf);
2086+
impl_cmp!(PathBuf, Path);
2087+
impl_cmp!(PathBuf, &'a Path);
2088+
impl_cmp!(Cow<'a, Path>, Path);
2089+
impl_cmp!(Cow<'a, Path>, &'b Path);
2090+
impl_cmp!(Cow<'a, Path>, PathBuf);
20762091

20772092
#[stable(since = "1.7.0", feature = "strip_prefix")]
20782093
impl fmt::Display for StripPrefixError {

0 commit comments

Comments
 (0)