From 9d535b4c04b81a54ba4b6143829349fb46fadc4c Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Fri, 3 Dec 2021 01:20:42 +0100 Subject: [PATCH] Extend emoji-identifiers ui test. --- src/test/ui/parser/emoji-identifiers.rs | 3 +++ src/test/ui/parser/emoji-identifiers.stderr | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/test/ui/parser/emoji-identifiers.rs b/src/test/ui/parser/emoji-identifiers.rs index ef18939bbb8..b50c046bcb2 100644 --- a/src/test/ui/parser/emoji-identifiers.rs +++ b/src/test/ui/parser/emoji-identifiers.rs @@ -13,4 +13,7 @@ fn main() { let _ = i_like_to_๐Ÿ˜„_a_lot() โž– 4; //~ ERROR cannot find function `i_like_to_๐Ÿ˜„_a_lot` in this scope //~^ ERROR identifiers cannot contain emoji //~| ERROR unknown start of token: \u{2796} + + let ๐Ÿฆ€ = 1;//~ ERROR Ferris cannot be used as an identifier + dbg!(๐Ÿฆ€); } diff --git a/src/test/ui/parser/emoji-identifiers.stderr b/src/test/ui/parser/emoji-identifiers.stderr index 5f9263c4c13..7dc589e5563 100644 --- a/src/test/ui/parser/emoji-identifiers.stderr +++ b/src/test/ui/parser/emoji-identifiers.stderr @@ -18,6 +18,14 @@ LL | fn i_like_to_๐Ÿ˜…_a_lot() -> ๐Ÿ‘€ { LL | let _ = i_like_to_๐Ÿ˜„_a_lot() โž– 4; | ^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `i_like_to_๐Ÿ˜…_a_lot` +error: Ferris cannot be used as an identifier + --> $DIR/emoji-identifiers.rs:17:9 + | +LL | let ๐Ÿฆ€ = 1; + | ^^ help: try using their name instead: `ferris` +LL | dbg!(๐Ÿฆ€); + | ^^ + error: identifiers cannot contain emoji: `ABig๐Ÿ‘ฉ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘งFamily` --> $DIR/emoji-identifiers.rs:1:8 | @@ -77,7 +85,7 @@ LL | ๐Ÿ‘€::full_ofโœจ() | function or associated item not found in `๐Ÿ‘€` | help: there is an associated function with a similar name: `full_of_โœจ` -error: aborting due to 9 previous errors +error: aborting due to 10 previous errors Some errors have detailed explanations: E0425, E0599. For more information about an error, try `rustc --explain E0425`.