about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-03-25 19:06:19 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-03-27 19:13:03 -0700
commitb477682dca3343eb89a467f0d3c73986a53d49d9 (patch)
tree8c9adc0901025a6f57681cb00cf466a393106cce /src/libsyntax_pos
parent78ae8feebbf9a2c70d42780d0c646cbbc1f2cdbc (diff)
downloadrust-b477682dca3343eb89a467f0d3c73986a53d49d9.tar.gz
rust-b477682dca3343eb89a467f0d3c73986a53d49d9.zip
Fix unittests
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index 07494ff904e..0662c1c9cfd 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -81,8 +81,8 @@ impl Span {
 
     /// Returns a new span representing the next character after the end-point of this span
     pub fn next_point(self) -> Span {
-        let lo = BytePos(cmp::max(self.hi.0, self.lo.0 + 1));
-        Span { lo: lo, hi: lo, expn_id: self.expn_id}
+        let lo = cmp::max(self.hi.0, self.lo.0 + 1);
+        Span { lo: BytePos(lo), hi: BytePos(lo + 1), expn_id: self.expn_id}
     }
 
     /// Returns `self` if `self` is not the dummy span, and `other` otherwise.