aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/rename.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs
index 41689a939..8096dfa0e 100644
--- a/crates/ide/src/rename.rs
+++ b/crates/ide/src/rename.rs
@@ -32,8 +32,9 @@ pub(crate) fn prepare_rename(
32 let syntax = source_file.syntax(); 32 let syntax = source_file.syntax();
33 33
34 let def = find_definition(&sema, syntax, position)?; 34 let def = find_definition(&sema, syntax, position)?;
35 let frange = 35 let frange = def
36 def.rename_range(&sema).ok_or_else(|| format_err!("No references found at position"))?; 36 .range_for_rename(&sema)
37 .ok_or_else(|| format_err!("No references found at position"))?;
37 Ok(RangeInfo::new(frange.range, ())) 38 Ok(RangeInfo::new(frange.range, ()))
38} 39}
39 40