Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libsyntax/errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl EmitterWriter {
};
let lo = self.cm.lookup_char_pos(sp.lo);
let hi = self.cm.lookup_char_pos(sp.hi);
let elide_sp = (lo.line - hi.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) {
Expand Down Expand Up @@ -1026,7 +1026,7 @@ mod test {
\x20 ^ ^\n";

let expect0_end = "dummy.txt: 5 ccccc\n\
\x20 ...\n\
dummy.txt: 6 xxxxx\n\
dummy.txt: 7 yyyyy\n\
\x20 ^\n\
\x20 ...\n\
Expand Down