Closed
Description
fn main() {
let 🦀 = "Manish";
}
errors with
error: unknown start of token: \u{1f980}
--> src/main.rs:2:9
|
2 | let 🦀 = "Manish";
For non-ASCII characters, we should perhaps error with something better. I don't know what the error text should be (cc @estebank), because it's not just emoji, and there's no easy way to define "XID characters" without just linking to the spec, which seems bad. Maybe we can link to the reference?
Tagging as easy since the implementation isn't tricky, but we will probably need to figure out a good error message.
Metadata
Metadata
Assignees
Labels
Area: UnicodeArea: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.