]> git.lizzy.rs Git - rust.git/commit
rustc: Fix position of diagnostic highlight lines
authorHaitao Li <lihaitao@gmail.com>
Thu, 24 Nov 2011 06:58:38 +0000 (14:58 +0800)
committerMarijn Haverbeke <marijnh@gmail.com>
Thu, 24 Nov 2011 07:10:11 +0000 (08:10 +0100)
commit2253ed5d1c056dac47c2fbd9dfd399a655230db0
tree53dd9489af206f288e7fa1c53aeba239c3dff1c4
parent8746ebe2e61f736306793ab24a0370af6eff2785
rustc: Fix position of diagnostic highlight lines

Diagnostic highlight lines are incorrect placed when the related line
number is 10, 100, etc.

The root cause is line number are treated as 0 based (should be 1 based)
when calculating offset of line number digits.
src/comp/syntax/codemap.rs