rust/tests/ui/parser/emoji-identifiers.rs
2023-01-11 09:32:08 +00:00

20 lines
789 B
Rust
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

struct ABig👩👩👧👧Family; //~ ERROR identifiers cannot contain emoji
struct 👀; //~ ERROR identifiers cannot contain emoji
impl 👀 {
fn full_of_() -> 👀 { //~ ERROR identifiers cannot contain emoji
👀
}
}
fn i_like_to_😅_a_lot() -> 👀 { //~ ERROR identifiers cannot contain emoji
👀::full_of() //~ ERROR no function or associated item named `full_of✨` found for struct `👀`
//~^ ERROR identifiers cannot contain emoji
}
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!(🦀);
}