File tree Expand file tree Collapse file tree 2 files changed +13
-20
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -1679,27 +1679,19 @@ impl EmitterWriter {
16791679 // Colorize addition/replacements with green.
16801680 for & SubstitutionHighlight { start, end } in highlight_parts {
16811681 // Account for tabs when highlighting (#87972).
1682- let start: usize = line
1683- . chars ( )
1684- . take ( start)
1685- . map ( |ch| match ch {
1686- '\t' => 4 ,
1687- _ => 1 ,
1688- } )
1689- . sum ( ) ;
1690-
1691- let end: usize = line
1692- . chars ( )
1693- . take ( end)
1694- . map ( |ch| match ch {
1695- '\t' => 4 ,
1696- _ => 1 ,
1697- } )
1698- . sum ( ) ;
1682+ // let tabs: usize = line
1683+ // .chars()
1684+ // .take(start)
1685+ // .map(|ch| match ch {
1686+ // '\t' => 3,
1687+ // _ => 0,
1688+ // })
1689+ // .sum();
1690+ let tabs = 0 ;
16991691 buffer. set_style_range (
17001692 row_num,
1701- max_line_num_len + 3 + start,
1702- max_line_num_len + 3 + end,
1693+ max_line_num_len + 3 + start + tabs ,
1694+ max_line_num_len + 3 + end + tabs ,
17031695 Style :: Addition ,
17041696 true ,
17051697 ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ extern crate rustc_macros;
1414
1515pub use emitter:: ColorConfig ;
1616
17- use tracing:: debug;
17+ use tracing:: { debug, info } ;
1818use Level :: * ;
1919
2020use emitter:: { is_case_difference, Emitter , EmitterWriter } ;
@@ -349,6 +349,7 @@ impl CodeSuggestion {
349349 while buf. ends_with ( '\n' ) {
350350 buf. pop ( ) ;
351351 }
352+ info ! ( ?buf, ?highlights) ;
352353 Some ( ( buf, substitution. parts , highlights, only_capitalization) )
353354 } )
354355 . collect ( )
You can’t perform that action at this time.
0 commit comments