diff options
Diffstat (limited to 'crates/ide/src/references')
-rw-r--r-- | crates/ide/src/references/rename.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index f3b5cfc8c..f9a11e43d 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs | |||
@@ -42,7 +42,14 @@ pub(crate) fn rename( | |||
42 | new_name: &str, | 42 | new_name: &str, |
43 | ) -> Result<RangeInfo<SourceChange>, RenameError> { | 43 | ) -> Result<RangeInfo<SourceChange>, RenameError> { |
44 | let sema = Semantics::new(db); | 44 | let sema = Semantics::new(db); |
45 | rename_with_semantics(&sema, position, new_name) | ||
46 | } | ||
45 | 47 | ||
48 | pub(crate) fn rename_with_semantics( | ||
49 | sema: &Semantics<RootDatabase>, | ||
50 | position: FilePosition, | ||
51 | new_name: &str, | ||
52 | ) -> Result<RangeInfo<SourceChange>, RenameError> { | ||
46 | match lex_single_syntax_kind(new_name) { | 53 | match lex_single_syntax_kind(new_name) { |
47 | Some(res) => match res { | 54 | Some(res) => match res { |
48 | (SyntaxKind::IDENT, _) => (), | 55 | (SyntaxKind::IDENT, _) => (), |