diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-02-02 00:32:18 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2016-02-02 00:32:18 -0500 |
| commit | a9fbb0553583bac39b442e2fe8a43f64efc1f09d (patch) | |
| tree | 6a74b93b68295a8572aa21c2601dbafac0dfc012 /src/libsyntax/errors | |
| parent | 674f71edd03b3df404d36fb188e7dda770a5cd1a (diff) | |
| parent | 54927ac57f95b4ac6747d29af45fef8e47225852 (diff) | |
| download | rust-a9fbb0553583bac39b442e2fe8a43f64efc1f09d.tar.gz rust-a9fbb0553583bac39b442e2fe8a43f64efc1f09d.zip | |
Rollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis
Diffstat (limited to 'src/libsyntax/errors')
| -rw-r--r-- | src/libsyntax/errors/emitter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/errors/emitter.rs b/src/libsyntax/errors/emitter.rs index 7e0e17423de..94bbd1bd128 100644 --- a/src/libsyntax/errors/emitter.rs +++ b/src/libsyntax/errors/emitter.rs @@ -516,7 +516,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) { @@ -1024,7 +1024,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\ |
