Disallow invalid raw ident names

This commit is contained in:
Ryo Yoshida 2023-02-13 18:05:23 +09:00
parent 9b0daf20c9
commit 57f0e9c100
No known key found for this signature in database
GPG key ID: E25698A930586171
2 changed files with 17 additions and 1 deletions

View file

@ -562,6 +562,15 @@ impl Foo {
);
}
#[test]
fn test_rename_mod_invalid_raw_ident() {
check(
"r#self",
r#"mod foo$0 {}"#,
"error: Invalid name: `self` cannot be a raw identifier",
);
}
#[test]
fn test_rename_for_local() {
check(