Skip to content

Commit 9d535b4

Browse files
committed
Extend emoji-identifiers ui test.
1 parent 41b1bcb commit 9d535b4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

β€Žsrc/test/ui/parser/emoji-identifiers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ fn main() {
1313
let _ = i_like_to_πŸ˜„_a_lot() βž– 4; //~ ERROR cannot find function `i_like_to_πŸ˜„_a_lot` in this scope
1414
//~^ ERROR identifiers cannot contain emoji
1515
//~| ERROR unknown start of token: \u{2796}
16+
17+
let πŸ¦€ = 1;//~ ERROR Ferris cannot be used as an identifier
18+
dbg!(πŸ¦€);
1619
}

β€Žsrc/test/ui/parser/emoji-identifiers.stderr

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ LL | fn i_like_to_πŸ˜…_a_lot() -> πŸ‘€ {
1818
LL | let _ = i_like_to_πŸ˜„_a_lot() βž– 4;
1919
| ^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `i_like_to_πŸ˜…_a_lot`
2020

21+
error: Ferris cannot be used as an identifier
22+
--> $DIR/emoji-identifiers.rs:17:9
23+
|
24+
LL | let πŸ¦€ = 1;
25+
| ^^ help: try using their name instead: `ferris`
26+
LL | dbg!(πŸ¦€);
27+
| ^^
28+
2129
error: identifiers cannot contain emoji: `ABigπŸ‘©πŸ‘©πŸ‘§πŸ‘§Family`
2230
--> $DIR/emoji-identifiers.rs:1:8
2331
|
@@ -77,7 +85,7 @@ LL | πŸ‘€::full_of✨()
7785
| function or associated item not found in `πŸ‘€`
7886
| help: there is an associated function with a similar name: `full_of_✨`
7987

80-
error: aborting due to 9 previous errors
88+
error: aborting due to 10 previous errors
8189

8290
Some errors have detailed explanations: E0425, E0599.
8391
For more information about an error, try `rustc --explain E0425`.

0 commit comments

Comments
Β (0)