diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-18 15:50:47 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-18 15:50:47 +0000 |
commit | 7614439033bc8b68d3982d93595161ddfda80837 (patch) | |
tree | d829b5cf22dedfb99dc154b48a3576be48dfbbc6 /crates/ra_ide_api/src/references.rs | |
parent | 9cc4d058d2b0a8741ef67b71986b4c51b4459426 (diff) | |
parent | a22cb1daa76ddc7c5078a7a80b11909dd480f9f2 (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.rs | 2 |
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 | } |