diff options
-rw-r--r-- | crates/ra_ide/src/references.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index bc241fb5a..de924fad2 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs | |||
@@ -211,10 +211,9 @@ fn process_definition( | |||
211 | TokenAtOffset::Between(_, t) => t, | 211 | TokenAtOffset::Between(_, t) => t, |
212 | }; | 212 | }; |
213 | let range = t.text_range(); | 213 | let range = t.text_range(); |
214 | let analyzer = analyzer.get_or_insert( | 214 | let analyzer = analyzer.get_or_insert_with(|| { |
215 | sb.analyze(InFile::new(file_id.into(), parse.tree().syntax()), None), | 215 | sb.analyze(InFile::new(file_id.into(), parse.tree().syntax()), None) |
216 | ); | 216 | }); |
217 | |||
218 | let expanded = descend_into_macros_with_analyzer( | 217 | let expanded = descend_into_macros_with_analyzer( |
219 | db, | 218 | db, |
220 | &analyzer, | 219 | &analyzer, |