Change:
This code (containing tabs) gives an error (): The error works fine on stable: But is mispositioned on rustc 1.25.0-nightly ( 2018-01-11) as well as on rustc 1.24.0-beta.2 ( 2018-01-10): cc
Interesting. Im new to code work so following you guys has been extremely helpful thanks
Using bisect-rust I could see that the issue started with , but probably the actual issue is somewhere else (e.g. in the machinery in that starts using for tabs).
Yeah, the issue also exists when emojis are involved (no tabs): Gives: The emoji manifestation of the issue is no beta regression, seems to exist on stable as well.
I've created for the emoji/unicode issue.
It seems to me that the issue only manifests itself in suggestions, and that is handled separately from the main diagnostics. Mentoring instructions:  needs to be modified to use instead of , the start being and the end being ( already accounts for unicode chars). This change should fix both this and .
Will pick this up

Discussion:
let sub_len = parts[0].snippet.trim().chars().fold(0, |acc, ch| { acc + unicode_width::UnicodeWidthChar::width(ch).unwrap_or(0) }); <del> let underline_start = span_start_pos.col.0 + start; let underline_end = span_start_pos.col.0 + start + sub_len; </del> <ins> let underline_start = span_start_pos.col_display + start; let underline_end = span_start_pos.col_display + start + sub_len; </ins> for p in underline_start..underline_end { buffer.putc(row_num, max_line_num_len + 3 + p,

<ins> // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // ignore-tidy-tab fn main() { let b = "hello"; let _a = b + ", World!"; //~^ ERROR E0369 } </ins>

<ins> error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47377.rs:13:12 | 13 |      let _a = b + ", World!"; |               ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | 13 |      let _a = b.to_owned() + ", World!"; |               ^^^^^^^^^^^^ error: aborting due to previous error </ins>

<ins> // Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. fn main() { let b = "hello"; println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; //~^ ERROR E0369 } </ins>

<ins> error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-47380.rs:12:33 | 12 |     println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; |                                      ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | 12 |     println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!"; |                                      ^^^^^^^^^^^^ error: aborting due to previous error </ins>