Skip to content

Instantly share code, notes, and snippets.

@rspencer01
Last active August 25, 2022 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rspencer01/e22310245bea81fd074d345604a5851a to your computer and use it in GitHub Desktop.
Save rspencer01/e22310245bea81fd074d345604a5851a to your computer and use it in GitHub Desktop.
Unicode identifiers
#![allow(uncommon_codepoints)]
fn main() {
// Plank's constant
let ℏ = 1.054571817e-34;
// The rust mascot
let 🦀 = "Ferris";
}
error: Ferris cannot be used as an identifier
--> foo.rs:5:9
|
5 | let 🦀 = "Ferris";
| ^^ help: try using their name instead: `ferris`
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment