fix: multi-token mapping aware find references

This commit is contained in:
Jonas Schievink 2021-09-01 18:17:32 +02:00
parent 81ab52c6ca
commit bdba35cc93
7 changed files with 155 additions and 86 deletions

View file

@ -134,8 +134,8 @@ pub(crate) fn resolve_annotation(db: &RootDatabase, mut annotation: Annotation)
AnnotationKind::HasReferences { position, data } => {
*data = find_all_refs(&Semantics::new(db), *position, None).map(|result| {
result
.references
.into_iter()
.flat_map(|res| res.references)
.map(|(file_id, access)| {
access.into_iter().map(move |(range, _)| FileRange { file_id, range })
})