File tree 1 file changed +33
-31
lines changed
compiler/rustc_errors/src
1 file changed +33
-31
lines changed Original file line number Diff line number Diff line change @@ -2561,41 +2561,42 @@ fn num_decimal_digits(num: usize) -> usize {
2561
2561
// Keep the following list in sync with `rustc_span::char_width`.
2562
2562
// ATTENTION: keep lexicografically sorted so that the binary search will work
2563
2563
const OUTPUT_REPLACEMENTS : & [ ( char , & str ) ] = & [
2564
+ // tidy-alphabetical-start
2564
2565
// In terminals without Unicode support the following will be garbled, but in *all* terminals
2565
2566
// the underlying codepoint will be as well. We could gate this replacement behind a "unicode
2566
2567
// support" gate.
2567
2568
( '\0' , "␀" ) ,
2568
- ( '\u{1 }' , "␁" ) ,
2569
- ( '\u{2 }' , "␂" ) ,
2570
- ( '\u{3 }' , "␃" ) ,
2571
- ( '\u{4 }' , "␄" ) ,
2572
- ( '\u{5 }' , "␅" ) ,
2573
- ( '\u{6 }' , "␆" ) ,
2574
- ( '\u{7 }' , "␇" ) ,
2575
- ( '\u{8 }' , "␈" ) ,
2576
- ( '\t ' , " " ) , // We do our own tab replacement
2577
- ( '\u{b }' , "␋" ) ,
2578
- ( '\u{c }' , "␌" ) ,
2579
- ( '\r ' , "␍" ) ,
2580
- ( '\u{e }' , "␎" ) ,
2581
- ( '\u{f }' , "␏" ) ,
2582
- ( '\u{10 }' , "␐" ) ,
2583
- ( '\u{11 }' , "␑" ) ,
2584
- ( '\u{12 }' , "␒" ) ,
2585
- ( '\u{13 }' , "␓" ) ,
2586
- ( '\u{14 }' , "␔" ) ,
2587
- ( '\u{15 }' , "␕" ) ,
2588
- ( '\u{16 }' , "␖" ) ,
2589
- ( '\u{17 }' , "␗" ) ,
2590
- ( '\u{18 }' , "␘" ) ,
2591
- ( '\u{19 }' , "␙" ) ,
2592
- ( '\u{1a }' , "␚" ) ,
2593
- ( '\u{1b }' , "␛" ) ,
2594
- ( '\u{1c }' , "␜" ) ,
2595
- ( '\u{1d }' , "␝" ) ,
2596
- ( '\u{1e }' , "␞" ) ,
2597
- ( '\u{1f }' , "␟" ) ,
2598
- ( '\u{7f }' , "␡" ) ,
2569
+ ( '\u{0001 }' , "␁" ) ,
2570
+ ( '\u{0002 }' , "␂" ) ,
2571
+ ( '\u{0003 }' , "␃" ) ,
2572
+ ( '\u{0004 }' , "␄" ) ,
2573
+ ( '\u{0005 }' , "␅" ) ,
2574
+ ( '\u{0006 }' , "␆" ) ,
2575
+ ( '\u{0007 }' , "␇" ) ,
2576
+ ( '\u{0008 }' , "␈" ) ,
2577
+ ( '\u{0009} ' , " " ) , // We do our own tab replacement
2578
+ ( '\u{000b }' , "␋" ) ,
2579
+ ( '\u{000c }' , "␌" ) ,
2580
+ ( '\u{000d} ' , "␍" ) ,
2581
+ ( '\u{000e }' , "␎" ) ,
2582
+ ( '\u{000f }' , "␏" ) ,
2583
+ ( '\u{0010 }' , "␐" ) ,
2584
+ ( '\u{0011 }' , "␑" ) ,
2585
+ ( '\u{0012 }' , "␒" ) ,
2586
+ ( '\u{0013 }' , "␓" ) ,
2587
+ ( '\u{0014 }' , "␔" ) ,
2588
+ ( '\u{0015 }' , "␕" ) ,
2589
+ ( '\u{0016 }' , "␖" ) ,
2590
+ ( '\u{0017 }' , "␗" ) ,
2591
+ ( '\u{0018 }' , "␘" ) ,
2592
+ ( '\u{0019 }' , "␙" ) ,
2593
+ ( '\u{001a }' , "␚" ) ,
2594
+ ( '\u{001b }' , "␛" ) ,
2595
+ ( '\u{001c }' , "␜" ) ,
2596
+ ( '\u{001d }' , "␝" ) ,
2597
+ ( '\u{001e }' , "␞" ) ,
2598
+ ( '\u{001f }' , "␟" ) ,
2599
+ ( '\u{007f }' , "␡" ) ,
2599
2600
( '\u{200d}' , "" ) , // Replace ZWJ for consistent terminal output of grapheme clusters.
2600
2601
( '\u{202a}' , "�" ) , // The following unicode text flow control characters are inconsistently
2601
2602
( '\u{202b}' , "�" ) , // supported across CLIs and can cause confusion due to the bytes on disk
@@ -2606,6 +2607,7 @@ const OUTPUT_REPLACEMENTS: &[(char, &str)] = &[
2606
2607
( '\u{2067}' , "�" ) ,
2607
2608
( '\u{2068}' , "�" ) ,
2608
2609
( '\u{2069}' , "�" ) ,
2610
+ // tidy-alphabetical-end
2609
2611
] ;
2610
2612
2611
2613
fn normalize_whitespace ( s : & str ) -> String {
You can’t perform that action at this time.
0 commit comments