diff --git a/src/librustc_data_structures/sorted_map.rs b/src/librustc_data_structures/sorted_map.rs index 5f45f430183..c8f85797191 100644 --- a/src/librustc_data_structures/sorted_map.rs +++ b/src/librustc_data_structures/sorted_map.rs @@ -143,6 +143,11 @@ impl SortedMap { self.data.len() } + #[inline] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + #[inline] pub fn range(&self, range: R) -> &[(K, V)] where R: RangeBounds