diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 6b79962ddd609..d44a216f234e0 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2081,6 +2081,7 @@ fn num_decimal_digits(num: usize) -> usize { // We replace some characters so the CLI output is always consistent and underlines aligned. const OUTPUT_REPLACEMENTS: &[(char, &str)] = &[ ('\t', " "), // We do our own tab replacement + ('\u{200D}', ""), // Replace ZWJ with nothing for consistent terminal output of grapheme clusters. ('\u{202A}', ""), // The following unicode text flow control characters are inconsistently ('\u{202B}', ""), // supported accross CLIs and can cause confusion due to the bytes on disk ('\u{202D}', ""), // not corresponding to the visible source code, so we replace them always. diff --git a/src/test/ui/parser/emoji-identifiers.stderr b/src/test/ui/parser/emoji-identifiers.stderr index 3b17bb01de953..84c3e3962ffec 100644 --- a/src/test/ui/parser/emoji-identifiers.stderr +++ b/src/test/ui/parser/emoji-identifiers.stderr @@ -48,10 +48,10 @@ error: identifiers cannot contain emojis: `i_like_to_😅_a_lot` LL | fn i_like_to_😅_a_lot() -> 👀 { | ^^^^^^^^^^^^^^^^^^ -error: identifiers cannot contain emojis: `ABig👩‍👩‍👧‍👧Family` +error: identifiers cannot contain emojis: `ABig👩👩👧👧Family` --> $DIR/emoji-identifiers.rs:1:8 | -LL | struct ABig👩‍👩‍👧‍👧Family; +LL | struct ABig👩👩👧👧Family; | ^^^^^^^^^^^^^^^^^^ error[E0599]: no function or associated item named `full_of✨` found for struct `👀` in the current scope