about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-11-14 17:49:02 -0800
committerEsteban Küber <esteban@kuber.com.ar>2017-11-24 07:34:31 -0800
commit1737d69c3b6632d56cd66144c9316ad643fb7507 (patch)
treea9fb3ad478516b48ffedc60e2fe5e56a0b7344b5 /src/librustc_errors
parent45594d5dec4237f49e794a2a854a69f50b63d31e (diff)
downloadrust-1737d69c3b6632d56cd66144c9316ad643fb7507.tar.gz
rust-1737d69c3b6632d56cd66144c9316ad643fb7507.zip
Fix underline in suggestions
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/emitter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index 17ed1734fe2..108d8e687fe 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -1155,7 +1155,7 @@ impl EmitterWriter {
                     let start = parts[0].snippet.len() - parts[0].snippet.trim_left().len();
                     let sub_len = parts[0].snippet.trim().len();
                     let underline_start = span_start_pos.col.0 + start;
-                    let underline_end = span_start_pos.col.0 + sub_len;
+                    let underline_end = span_start_pos.col.0 + start + sub_len;
                     for p in underline_start..underline_end {
                         buffer.putc(row_num,
                                     max_line_num_len + 3 + p,