]> git.lizzy.rs Git - rust.git/commitdiff
off by one
authorOliver Schneider <github333195615777966@oli-obk.de>
Sat, 30 Jan 2016 12:40:40 +0000 (13:40 +0100)
committerOliver Schneider <github333195615777966@oli-obk.de>
Sat, 30 Jan 2016 12:40:40 +0000 (13:40 +0100)
src/libsyntax/errors/emitter.rs

index f6a01d2499515706868737e91779b42ba1f32630..d3982f6a5b62834366e6840097672cc7a7b08000 100644 (file)
@@ -518,7 +518,7 @@ fn end_highlight_lines(&mut self,
                 };
                 let lo = self.cm.lookup_char_pos(sp.lo);
                 let hi = self.cm.lookup_char_pos(sp.hi);
-                let elide_sp = (hi.line - lo.line) > MAX_SP_LINES;
+                let elide_sp = (hi.line - lo.line) >= MAX_SP_LINES;
 
                 let line_num = line.line_index + 1;
                 if !(lo.line <= line_num && hi.line >= line_num) {