diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-29 01:16:25 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-30 17:05:56 +1100 |
| commit | dba94164e91fb35eace352eceeb0f4e934b7a97e (patch) | |
| tree | 10e54dc2431e883e7f971f527e6708eebc8649f7 /compiler/rustc_session/src/utils.rs | |
| parent | f8ce1864d307f715dcce49dc5bb5371ba360c8dc (diff) | |
| download | rust-dba94164e91fb35eace352eceeb0f4e934b7a97e.tar.gz rust-dba94164e91fb35eace352eceeb0f4e934b7a97e.zip | |
Move `is_ascii_ident` to where it's used.
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
| -rw-r--r-- | compiler/rustc_session/src/utils.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs index 3ed044ad769..f76c69af526 100644 --- a/compiler/rustc_session/src/utils.rs +++ b/compiler/rustc_session/src/utils.rs @@ -158,14 +158,3 @@ pub fn extra_compiler_flags() -> Option<(Vec<String>, bool)> { if !result.is_empty() { Some((result, excluded_cargo_defaults)) } else { None } } - -pub(crate) fn is_ascii_ident(string: &str) -> bool { - let mut chars = string.chars(); - if let Some(start) = chars.next() - && (start.is_ascii_alphabetic() || start == '_') - { - chars.all(|char| char.is_ascii_alphanumeric() || char == '_') - } else { - false - } -} |
