diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-19 18:00:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-19 18:00:01 +0100 |
commit | f5b7540f388e815b3c4c2fb28b8233c724e0a838 (patch) | |
tree | 15017f0b41ea44614d603f0b9e029e7bc86a5c44 /crates/ide/src/references.rs | |
parent | 686a6a26fd2263e4bb958fbcf94b04244ed73e08 (diff) | |
parent | 81b0976187d73eba4f9b14d8a0b8539ab8f06dcd (diff) |
Merge #5820
5820: Future proof find-usages API
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r-- | crates/ide/src/references.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 0a76ec6b4..722c8f406 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -106,7 +106,9 @@ pub(crate) fn find_all_refs( | |||
106 | let RangeInfo { range, info: def } = find_name(&sema, &syntax, position, opt_name)?; | 106 | let RangeInfo { range, info: def } = find_name(&sema, &syntax, position, opt_name)?; |
107 | 107 | ||
108 | let references = def | 108 | let references = def |
109 | .find_usages(sema, search_scope) | 109 | .usages(sema) |
110 | .set_scope(search_scope) | ||
111 | .all() | ||
110 | .into_iter() | 112 | .into_iter() |
111 | .filter(|r| search_kind == ReferenceKind::Other || search_kind == r.kind) | 113 | .filter(|r| search_kind == ReferenceKind::Other || search_kind == r.kind) |
112 | .collect(); | 114 | .collect(); |