aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-18 15:50:47 +0000
committerGitHub <[email protected]>2019-11-18 15:50:47 +0000
commit7614439033bc8b68d3982d93595161ddfda80837 (patch)
treed829b5cf22dedfb99dc154b48a3576be48dfbbc6 /crates/ra_ide_api/src/references.rs
parent9cc4d058d2b0a8741ef67b71986b4c51b4459426 (diff)
parenta22cb1daa76ddc7c5078a7a80b11909dd480f9f2 (diff)
Merge #2304
2304: Use Source<&ast::Name> in classify_name r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/references.rs')
-rw-r--r--crates/ra_ide_api/src/references.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs
index 1af7e8a9f..cb343e59a 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide_api/src/references.rs
@@ -110,7 +110,7 @@ fn find_name<'a>(
110 position: FilePosition, 110 position: FilePosition,
111) -> Option<RangeInfo<(String, NameDefinition)>> { 111) -> Option<RangeInfo<(String, NameDefinition)>> {
112 if let Some(name) = find_node_at_offset::<ast::Name>(&syntax, position.offset) { 112 if let Some(name) = find_node_at_offset::<ast::Name>(&syntax, position.offset) {
113 let def = classify_name(db, position.file_id, &name)?; 113 let def = classify_name(db, Source::new(position.file_id.into(), &name))?;
114 let range = name.syntax().text_range(); 114 let range = name.syntax().text_range();
115 return Some(RangeInfo::new(range, (name.text().to_string(), def))); 115 return Some(RangeInfo::new(range, (name.text().to_string(), def)));
116 } 116 }