From 02ad828c6dc544ac2fb20b85d85ccf6ea495df9c Mon Sep 17 00:00:00 2001 From: ivan770 Date: Sat, 13 Feb 2021 13:22:12 +0200 Subject: Fix incorrect references annotation --- crates/ide/src/annotations.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs index 6d54b6b57..a6f093ad7 100644 --- a/crates/ide/src/annotations.rs +++ b/crates/ide/src/annotations.rs @@ -129,9 +129,10 @@ pub(crate) fn resolve_annotation(db: &RootDatabase, mut annotation: Annotation) result .references .into_iter() - .map(|(_, access)| access.into_iter()) + .map(|(file_id, access)| { + access.into_iter().map(move |(range, _)| FileRange { file_id, range }) + }) .flatten() - .map(|(range, _)| FileRange { file_id: position.file_id, range }) .collect() }); } -- cgit v1.2.3