We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 674f71e + 54927ac commit a9fbb05Copy full SHA for a9fbb05
src/libsyntax/errors/emitter.rs
@@ -516,7 +516,7 @@ impl EmitterWriter {
516
};
517
let lo = self.cm.lookup_char_pos(sp.lo);
518
let hi = self.cm.lookup_char_pos(sp.hi);
519
- let elide_sp = (lo.line - hi.line) > MAX_SP_LINES;
+ let elide_sp = (hi.line - lo.line) >= MAX_SP_LINES;
520
521
let line_num = line.line_index + 1;
522
if !(lo.line <= line_num && hi.line >= line_num) {
@@ -1024,7 +1024,7 @@ mod test {
1024
\x20 ^ ^\n";
1025
1026
let expect0_end = "dummy.txt: 5 ccccc\n\
1027
- \x20 ...\n\
+ dummy.txt: 6 xxxxx\n\
1028
dummy.txt: 7 yyyyy\n\
1029
\x20 ^\n\
1030
\x20 ...\n\
0 commit comments