mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Disallow invalid raw ident names
This commit is contained in:
parent
9b0daf20c9
commit
57f0e9c100
2 changed files with 17 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue