File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -638,7 +638,7 @@ impl Cursor<'_> {
638
638
|| self . first ( ) . is_digit ( 10 )
639
639
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
640
640
// 5.0, but Unicode is already newer than this.
641
- || unic_emoji_char:: is_emoji ( self . first ( ) )
641
+ || ! self . first ( ) . is_ascii ( ) && unic_emoji_char:: is_emoji ( self . first ( ) )
642
642
} ;
643
643
644
644
if !can_be_a_lifetime {
@@ -658,7 +658,7 @@ impl Cursor<'_> {
658
658
659
659
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
660
660
// 5.0, but Unicode is already newer than this.
661
- if unic_emoji_char:: is_emoji ( self . first ( ) ) {
661
+ if ! self . first ( ) . is_ascii ( ) && unic_emoji_char:: is_emoji ( self . first ( ) ) {
662
662
contains_emoji = true ;
663
663
} else {
664
664
// Skip the literal contents.
@@ -671,7 +671,10 @@ impl Cursor<'_> {
671
671
true
672
672
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
673
673
// 5.0, but Unicode is already newer than this.
674
- } else if unic_emoji_char:: is_emoji ( c) {
674
+ // `#` ends an identifier, but is counted as an emoji because of
675
+ // https://github.com/open-i18n/rust-unic/issues/280. These can be common on macros, so
676
+ // we need to handle them properly. (#109746)
677
+ } else if !c. is_ascii ( ) && unic_emoji_char:: is_emoji ( c) {
675
678
contains_emoji = true ;
676
679
true
677
680
} else {
You can’t perform that action at this time.
0 commit comments