From e24e22f288eba33928a9e579f13653d6f04fcdfa Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Sat, 3 Oct 2020 17:34:52 +0300 Subject: Add fix for incorrect case diagnostic --- crates/ide/src/references/rename.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/ide/src/references/rename.rs') 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( new_name: &str, ) -> Result, RenameError> { let sema = Semantics::new(db); + rename_with_semantics(&sema, position, new_name) +} +pub(crate) fn rename_with_semantics( + sema: &Semantics, + position: FilePosition, + new_name: &str, +) -> Result, RenameError> { match lex_single_syntax_kind(new_name) { Some(res) => match res { (SyntaxKind::IDENT, _) => (), -- cgit v1.2.3