From 8e3e5ab2c81f238ea4e731f55eac79b74d9d84c3 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 5 Jan 2019 22:37:59 +0100 Subject: Make FnScopes use hir::Expr This was a bit complicated. I've added a wrapper type for now that does the LocalSyntaxPtr <-> ExprId translation; we might want to get rid of that or give it a nicer interface. --- crates/ra_analysis/src/imp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_analysis/src/imp.rs') 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 { .collect::>(); ret.extend( descr - .scopes(self) + .scopes(self)? .find_all_refs(binding) .into_iter() .map(|ref_desc| (position.file_id, ref_desc.range)), @@ -185,7 +185,7 @@ impl db::RootDatabase { position.file_id, name_ref.syntax(), )?); - let scope = descr.scopes(db); + let scope = descr.scopes(db)?; let resolved = ctry!(scope.resolve_local_name(name_ref)); let resolved = resolved.ptr().resolve(source_file); let binding = ctry!(find_node_at_offset::( -- cgit v1.2.3