proc_macro: move some implementation details to a rustc module.
This commit is contained in:
@@ -1775,12 +1775,6 @@ fn ident_continue(c: Option<char>) -> bool {
|
||||
(c > '\x7f' && c.is_xid_continue())
|
||||
}
|
||||
|
||||
// The string is a valid identifier or a lifetime identifier.
|
||||
pub fn is_valid_ident(s: &str) -> bool {
|
||||
let mut chars = s.chars();
|
||||
ident_start(chars.next()) && chars.all(|ch| ident_continue(Some(ch)))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user