internal: Properly check the edition for edition dependent syntax kinds

This commit is contained in:
Lukas Wirth 2024-08-15 14:50:57 +02:00
parent 2b86639018
commit f90bdfc13d
23 changed files with 348 additions and 130 deletions

View file

@ -117,7 +117,7 @@ pub fn name_ref(name_ref: &str) -> ast::NameRef {
ast_from_text(&format!("fn f() {{ {raw_escape}{name_ref}; }}"))
}
fn raw_ident_esc(ident: &str) -> &'static str {
if is_raw_identifier(ident) {
if is_raw_identifier(ident, Edition::CURRENT) {
"r#"
} else {
""