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 {
20542054 MAX_DIGITS
20552055}
20562056
2057+ const REPLACEMENTS : & [ ( char , & str ) ] = & [
2058+ ( '\t' , " " ) ,
2059+ ( '\u{200D}' , "" ) , // Replace ZWJ with nothing for consistent terminal output of grapheme clusters.
2060+ ] ;
2061+
20572062fn 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
20592068}
20602069
20612070fn 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`
4848LL | fn i_like_to_😅_a_lot() -> 👀 {
4949 | ^^^^^^^^^^^^^^^^^^
5050
51- error: identifiers cannot contain emojis: `ABig👩👩👧 👧Family`
51+ error: identifiers cannot contain emojis: `ABig👩👩👧 👧Family`
5252 --> $DIR/emoji-identifiers.rs:1:8
5353 |
54- LL | struct ABig👩👩👧 👧Family;
54+ LL | struct ABig👩👩👧 👧Family;
5555 | ^^^^^^^^^^^^^^^^^^
5656
5757error[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