File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2054,8 +2054,17 @@ fn num_decimal_digits(num: usize) -> usize {
2054
2054
MAX_DIGITS
2055
2055
}
2056
2056
2057
+ const REPLACEMENTS : & [ ( char , & str ) ] = & [
2058
+ ( '\t' , " " ) ,
2059
+ ( '\u{200D}' , "" ) , // Replace ZWJ with nothing for consistent terminal output of grapheme clusters.
2060
+ ] ;
2061
+
2057
2062
fn replace_tabs ( str : & str ) -> String {
2058
- str. replace ( '\t' , " " )
2063
+ let mut output = str. to_string ( ) ;
2064
+ for ( c, replacement) in REPLACEMENTS {
2065
+ output = output. replace ( * c, replacement) ;
2066
+ }
2067
+ output
2059
2068
}
2060
2069
2061
2070
fn draw_col_separator ( buffer : & mut StyledBuffer , line : usize , col : usize ) {
Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ error: identifiers cannot contain emojis: `i_like_to_😅_a_lot`
48
48
LL | fn i_like_to_😅_a_lot() -> 👀 {
49
49
| ^^^^^^^^^^^^^^^^^^
50
50
51
- error: identifiers cannot contain emojis: `ABig👩👩👧 👧Family`
51
+ error: identifiers cannot contain emojis: `ABig👩👩👧 👧Family`
52
52
--> $DIR/emoji-identifiers.rs:1:8
53
53
|
54
- LL | struct ABig👩👩👧 👧Family;
54
+ LL | struct ABig👩👩👧 👧Family;
55
55
| ^^^^^^^^^^^^^^^^^^
56
56
57
57
error[E0599]: no function or associated item named `full_of✨` found for struct `👀` in the current scope
You can’t perform that action at this time.
0 commit comments