summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-04 14:29:08 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-04 14:29:08 +0800
commit889eddb04d3f1631d9361767886309dd2f9b989a (patch)
tree1dd2f813d6917226f8d592140597c4fe680d2d9c
parentca59f1e56b2fb221a86b53f75708b36524cc7274 (diff)
downloadmrust-889eddb04d3f1631d9361767886309dd2f9b989a.tar.gz
HIR - Fix sorting of SimplePath
-rw-r--r--src/hir/path.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hir/path.hpp b/src/hir/path.hpp
index 57a8330b..c791812d 100644
--- a/src/hir/path.hpp
+++ b/src/hir/path.hpp
@@ -65,8 +65,8 @@ struct SimplePath
}
bool operator<(const SimplePath& x) const {
if( m_crate_name < x.m_crate_name ) return true;
- if( m_components < x.m_components ) return true;
- return false;
+ if( m_crate_name > x.m_crate_name ) return false;
+ return ( m_components < x.m_components );
}
Ordering ord(const SimplePath& x) const {
auto rv = ::ord(m_crate_name, x.m_crate_name);