diff options
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 137f26302..0380788ac 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -508,7 +508,9 @@ pub fn handle_rename(world: WorldSnapshot, params: RenameParams) -> Result<Optio | |||
508 | 508 | ||
509 | // Only rename to valid identifiers | 509 | // Only rename to valid identifiers |
510 | let tokens = tokenize(¶ms.new_name); | 510 | let tokens = tokenize(¶ms.new_name); |
511 | if tokens.len() != 1 || tokens[0].kind != SyntaxKind::IDENT { | 511 | if tokens.len() != 1 |
512 | || (tokens[0].kind != SyntaxKind::IDENT && tokens[0].kind != SyntaxKind::UNDERSCORE) | ||
513 | { | ||
512 | return Ok(None); | 514 | return Ok(None); |
513 | } | 515 | } |
514 | 516 | ||