aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/references.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index b995913af..5e2fe1905 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -196,7 +196,9 @@ fn process_definition(
196 196
197 for (file_id, search_range) in scope { 197 for (file_id, search_range) in scope {
198 let text = db.file_text(file_id); 198 let text = db.file_text(file_id);
199
199 let parse = Lazy::new(|| SourceFile::parse(&text)); 200 let parse = Lazy::new(|| SourceFile::parse(&text));
201 let mut sb = Lazy::new(|| SourceBinder::new(db));
200 202
201 for (idx, _) in text.match_indices(pat) { 203 for (idx, _) in text.match_indices(pat) {
202 let offset = TextUnit::from_usize(idx); 204 let offset = TextUnit::from_usize(idx);
@@ -212,7 +214,7 @@ fn process_definition(
212 } 214 }
213 // FIXME: reuse sb 215 // FIXME: reuse sb
214 // See https://github.com/rust-lang/rust/pull/68198#issuecomment-574269098 216 // See https://github.com/rust-lang/rust/pull/68198#issuecomment-574269098
215 let mut sb = SourceBinder::new(db); 217
216 if let Some(d) = classify_name_ref(&mut sb, InFile::new(file_id.into(), &name_ref)) 218 if let Some(d) = classify_name_ref(&mut sb, InFile::new(file_id.into(), &name_ref))
217 { 219 {
218 if d == def { 220 if d == def {