diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-31 22:51:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-31 22:51:15 +0200 |
| commit | 57c57a555bc21b490532be5b43bdf00227f5beaa (patch) | |
| tree | 45a9504d6e647672e38834301ca753d14c0325fa /tests | |
| parent | 7c6942a11bb49c7847fb565d38dc9318c6ac5117 (diff) | |
| parent | bca79a26d80147e3bcf87d6d5e95ff4a303d7eda (diff) | |
| download | rust-57c57a555bc21b490532be5b43bdf00227f5beaa.tar.gz rust-57c57a555bc21b490532be5b43bdf00227f5beaa.zip | |
Rollup merge of #114193 - crlf0710:lexer_unicode15, r=Manishearth
Update lexer emoji diagnostics to Unicode 15.0 This replaces the `unic-emoji-char` dep tree (which hasn't been updated for a while) with `unicode-properties` crate which contains Unicode 15.0 data. Improves diagnostics for added emoji characters in recent years. (See tests). cc #101840 cc ``@Manishearth``
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/lexer/lex-emoji-identifiers.rs | 6 | ||||
| -rw-r--r-- | tests/ui/lexer/lex-emoji-identifiers.stderr | 34 |
2 files changed, 19 insertions, 21 deletions
diff --git a/tests/ui/lexer/lex-emoji-identifiers.rs b/tests/ui/lexer/lex-emoji-identifiers.rs index 91b5929c0fe..decf2f00587 100644 --- a/tests/ui/lexer/lex-emoji-identifiers.rs +++ b/tests/ui/lexer/lex-emoji-identifiers.rs @@ -1,9 +1,7 @@ fn invalid_emoji_usages() { let arrow↔️ = "basic emoji"; //~ ERROR: identifiers cannot contain emoji - // FIXME - let planet🪐 = "basic emoji"; //~ ERROR: unknown start of token - // FIXME - let wireless🛜 = "basic emoji"; //~ ERROR: unknown start of token + let planet🪐 = "basic emoji"; //~ ERROR: identifiers cannot contain emoji + let wireless🛜 = "basic emoji"; //~ ERROR: identifiers cannot contain emoji // FIXME let key1️⃣ = "keycap sequence"; //~ ERROR: unknown start of token //~^ WARN: identifier contains uncommon Unicode codepoints diff --git a/tests/ui/lexer/lex-emoji-identifiers.stderr b/tests/ui/lexer/lex-emoji-identifiers.stderr index 6237c5d0236..747825fa2a9 100644 --- a/tests/ui/lexer/lex-emoji-identifiers.stderr +++ b/tests/ui/lexer/lex-emoji-identifiers.stderr @@ -1,17 +1,5 @@ -error: unknown start of token: \u{1fa90} - --> $DIR/lex-emoji-identifiers.rs:4:15 - | -LL | let planet🪐 = "basic emoji"; - | ^^ - -error: unknown start of token: \u{1f6dc} - --> $DIR/lex-emoji-identifiers.rs:6:17 - | -LL | let wireless🛜 = "basic emoji"; - | ^^ - error: unknown start of token: \u{20e3} - --> $DIR/lex-emoji-identifiers.rs:8:14 + --> $DIR/lex-emoji-identifiers.rs:6:14 | LL | let key1️⃣ = "keycap sequence"; | ^ @@ -22,26 +10,38 @@ error: identifiers cannot contain emoji: `arrow↔️` LL | let arrow↔️ = "basic emoji"; | ^^^^^^ +error: identifiers cannot contain emoji: `planet🪐` + --> $DIR/lex-emoji-identifiers.rs:3:9 + | +LL | let planet🪐 = "basic emoji"; + | ^^^^^^^^ + +error: identifiers cannot contain emoji: `wireless🛜` + --> $DIR/lex-emoji-identifiers.rs:4:9 + | +LL | let wireless🛜 = "basic emoji"; + | ^^^^^^^^^^ + error: identifiers cannot contain emoji: `flag🇺🇳` - --> $DIR/lex-emoji-identifiers.rs:10:9 + --> $DIR/lex-emoji-identifiers.rs:8:9 | LL | let flag🇺🇳 = "flag sequence"; | ^^^^^^ error: identifiers cannot contain emoji: `wales🏴` - --> $DIR/lex-emoji-identifiers.rs:11:9 + --> $DIR/lex-emoji-identifiers.rs:9:9 | LL | let wales🏴 = "tag sequence"; | ^^^^^^^ error: identifiers cannot contain emoji: `folded🙏🏿` - --> $DIR/lex-emoji-identifiers.rs:12:9 + --> $DIR/lex-emoji-identifiers.rs:10:9 | LL | let folded🙏🏿 = "modifier sequence"; | ^^^^^^^^^^ warning: identifier contains uncommon Unicode codepoints - --> $DIR/lex-emoji-identifiers.rs:8:9 + --> $DIR/lex-emoji-identifiers.rs:6:9 | LL | let key1️⃣ = "keycap sequence"; | ^^^^ |
