diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-06 13:45:22 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-06 13:45:22 +0000 |
commit | eaf553dade9a28b41631387d7c88b09fd0ba64e2 (patch) | |
tree | f5043da62c6cf4e2f082f68746843de7dfe53d03 /crates/ra_analysis/src/imp.rs | |
parent | cbac31cbdb2168b18fc6fb89f5cf069238cc6ccb (diff) | |
parent | 98957f4e6f66469310072dff5dfc3e521a7cd555 (diff) |
Merge #441
441: hir::Expr r=matklad a=flodiebold
Still a bit to do, but I already adapted `FnScopes` and thought I'd get feedback already.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 6ab3c5476..5988fb779 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -157,7 +157,7 @@ impl db::RootDatabase { | |||
157 | .collect::<Vec<_>>(); | 157 | .collect::<Vec<_>>(); |
158 | ret.extend( | 158 | ret.extend( |
159 | descr | 159 | descr |
160 | .scopes(self) | 160 | .scopes(self)? |
161 | .find_all_refs(binding) | 161 | .find_all_refs(binding) |
162 | .into_iter() | 162 | .into_iter() |
163 | .map(|ref_desc| (position.file_id, ref_desc.range)), | 163 | .map(|ref_desc| (position.file_id, ref_desc.range)), |
@@ -185,7 +185,7 @@ impl db::RootDatabase { | |||
185 | position.file_id, | 185 | position.file_id, |
186 | name_ref.syntax(), | 186 | name_ref.syntax(), |
187 | )?); | 187 | )?); |
188 | let scope = descr.scopes(db); | 188 | let scope = descr.scopes(db)?; |
189 | let resolved = ctry!(scope.resolve_local_name(name_ref)); | 189 | let resolved = ctry!(scope.resolve_local_name(name_ref)); |
190 | let resolved = resolved.ptr().resolve(source_file); | 190 | let resolved = resolved.ptr().resolve(source_file); |
191 | let binding = ctry!(find_node_at_offset::<ast::BindPat>( | 191 | let binding = ctry!(find_node_at_offset::<ast::BindPat>( |