File tree 2 files changed +13
-20
lines changed
compiler/rustc_errors/src
2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -1679,27 +1679,19 @@ impl EmitterWriter {
1679
1679
// Colorize addition/replacements with green.
1680
1680
for & SubstitutionHighlight { start, end } in highlight_parts {
1681
1681
// 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 ;
1699
1691
buffer. set_style_range (
1700
1692
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 ,
1703
1695
Style :: Addition ,
1704
1696
true ,
1705
1697
) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ extern crate rustc_macros;
14
14
15
15
pub use emitter:: ColorConfig ;
16
16
17
- use tracing:: debug;
17
+ use tracing:: { debug, info } ;
18
18
use Level :: * ;
19
19
20
20
use emitter:: { is_case_difference, Emitter , EmitterWriter } ;
@@ -349,6 +349,7 @@ impl CodeSuggestion {
349
349
while buf. ends_with ( '\n' ) {
350
350
buf. pop ( ) ;
351
351
}
352
+ info ! ( ?buf, ?highlights) ;
352
353
Some ( ( buf, substitution. parts , highlights, only_capitalization) )
353
354
} )
354
355
. collect ( )
You can’t perform that action at this time.
0 commit comments