diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-29 20:03:44 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-29 20:03:44 +0000 |
commit | ac30710ada112984c9cf79c4af39ad666d000171 (patch) | |
tree | 2a819761bd55b14238b2a2674805ce5a0ae86a0d /crates/ide_db/src | |
parent | 25ebcca224dc220c0439d9c82c6ef5ffa131c409 (diff) | |
parent | de4ada22d484950a6f416f25c85566ea9d1830a9 (diff) |
Merge #6665
6665: Support self in reference search r=matklad a=Veykril
The approach here is simply checking the descendants of the function body for `PathExpr` then checking whether it only contains a single `self` `PathSegment`, this is to prevent us from picking up `self` tokens from local `UseTree`s.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/search.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index a3e765d05..607185ca9 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -31,6 +31,7 @@ pub enum ReferenceKind { | |||
31 | FieldShorthandForLocal, | 31 | FieldShorthandForLocal, |
32 | StructLiteral, | 32 | StructLiteral, |
33 | RecordFieldExprOrPat, | 33 | RecordFieldExprOrPat, |
34 | SelfKw, | ||
34 | Other, | 35 | Other, |
35 | } | 36 | } |
36 | 37 | ||