about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorJonathan Turner <jturner@mozilla.com>2016-09-19 12:31:56 -0700
committerJonathan Turner <jturner@mozilla.com>2016-09-19 12:31:56 -0700
commit2ea3ab3a9022a93e45c4d50a1c43aec5f56ab4dc (patch)
tree28b2c21cf26ac97dd70651b1970bdab4c462b816 /src/libsyntax_pos
parent8394685b8385156fc4bc31cfbc693867e276d9d7 (diff)
downloadrust-2ea3ab3a9022a93e45c4d50a1c43aec5f56ab4dc.tar.gz
rust-2ea3ab3a9022a93e45c4d50a1c43aec5f56ab4dc.zip
Add the ability to merge spans to codemap
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/lib.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index d835f8058fa..0c0c62275d4 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -96,24 +96,6 @@ impl Span {
         self.lo == other.lo && self.hi == other.hi
     }
 
-    /// Returns `Some(span)`, a union of `self` and `other`, on overlap.
-    pub fn merge(self, other: Span) -> Option<Span> {
-        if self.expn_id != other.expn_id {
-            return None;
-        }
-
-        if (self.lo <= other.lo && self.hi > other.lo) ||
-           (self.lo >= other.lo && self.lo < other.hi) {
-            Some(Span {
-                lo: cmp::min(self.lo, other.lo),
-                hi: cmp::max(self.hi, other.hi),
-                expn_id: self.expn_id,
-            })
-        } else {
-            None
-        }
-    }
-
     /// Returns `Some(span)`, where the start is trimmed by the end of `other`
     pub fn trim_start(self, other: Span) -> Option<Span> {
         if self.hi > other.hi {