mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-21 01:24:13 +00:00
8 lines
307 B
Rust
8 lines
307 B
Rust
//! A set of utils methods to reuse on other abstraction levels
|
|
|
|
use crate::SyntaxKind;
|
|
|
|
pub fn is_raw_identifier(name: &str, edition: parser::Edition) -> bool {
|
|
let is_keyword = SyntaxKind::from_keyword(name, edition).is_some();
|
|
is_keyword && !matches!(name, "self" | "crate" | "super" | "Self")
|
|
}
|