We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e533bb7 commit a56b0e9Copy full SHA for a56b0e9
compiler/rustc_builtin_macros/src/format_foreign.rs
@@ -716,17 +716,11 @@ pub mod shell {
716
}
717
718
fn is_ident_head(c: char) -> bool {
719
- match c {
720
- 'a'..='z' | 'A'..='Z' | '_' => true,
721
- _ => false,
722
- }
+ c.is_ascii_alphabetic() || c == '_'
723
724
725
fn is_ident_tail(c: char) -> bool {
726
727
- '0'..='9' => true,
728
- c => is_ident_head(c),
729
+ c.is_ascii_alphanumeric() || c == '_'
730
731
732
#[cfg(test)]
0 commit comments