Skip to content

Commit a9fbb05

Browse files
committed
Rollup merge of rust-lang#31281 - oli-obk:patch-2, r=nikomatsakis
2 parents 674f71e + 54927ac commit a9fbb05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/errors/emitter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl EmitterWriter {
516516
};
517517
let lo = self.cm.lookup_char_pos(sp.lo);
518518
let hi = self.cm.lookup_char_pos(sp.hi);
519-
let elide_sp = (lo.line - hi.line) > MAX_SP_LINES;
519+
let elide_sp = (hi.line - lo.line) >= MAX_SP_LINES;
520520

521521
let line_num = line.line_index + 1;
522522
if !(lo.line <= line_num && hi.line >= line_num) {
@@ -1024,7 +1024,7 @@ mod test {
10241024
\x20 ^ ^\n";
10251025

10261026
let expect0_end = "dummy.txt: 5 ccccc\n\
1027-
\x20 ...\n\
1027+
dummy.txt: 6 xxxxx\n\
10281028
dummy.txt: 7 yyyyy\n\
10291029
\x20 ^\n\
10301030
\x20 ...\n\

0 commit comments

Comments
 (0)