diff options
| author | Florian Hartwig <florian.j.hartwig@gmail.com> | 2017-05-17 21:27:58 +0200 |
|---|---|---|
| committer | Florian Hartwig <florian.j.hartwig@gmail.com> | 2017-05-18 00:21:57 +0200 |
| commit | eb703f78515db10854d290b2f16e332cbc1c510d (patch) | |
| tree | 1779096c3626a445f0fed498df3be702e0a81a6f /src/librustc/infer | |
| parent | 2b6ed3a05149325448a42a119a3174093caa41f3 (diff) | |
| download | rust-eb703f78515db10854d290b2f16e332cbc1c510d.tar.gz rust-eb703f78515db10854d290b2f16e332cbc1c510d.zip | |
Fix off-by-one error in column number in `explain_span`.
Diffstat (limited to 'src/librustc/infer')
| -rw-r--r-- | src/librustc/infer/error_reporting/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index c07b3b3c4be..0515e1cc304 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -113,7 +113,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { heading: &str, span: Span) -> (String, Option<Span>) { let lo = tcx.sess.codemap().lookup_char_pos_adj(span.lo); - (format!("the {} at {}:{}", heading, lo.line, lo.col.to_usize()), + (format!("the {} at {}:{}", heading, lo.line, lo.col.to_usize() + 1), Some(span)) } |
