From b260641e0caa3938151afe66fa3bf5691b8c3caa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 13 Apr 2019 11:29:47 +0300 Subject: slight encapsulation --- crates/ra_hir/src/source_binder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 34a00a300..8d53079c6 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -368,7 +368,7 @@ fn scope_for_offset( offset: TextUnit, ) -> Option { scopes - .scope_for + .scope_by_expr() .iter() .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope))) // find containing scope @@ -388,7 +388,7 @@ fn adjust( ) -> Option { let r = ptr.range(); let child_scopes = scopes - .scope_for + .scope_by_expr() .iter() .filter_map(|(id, scope)| Some((source_map.expr_syntax(*id)?, scope))) .map(|(ptr, scope)| (ptr.range(), scope)) -- cgit v1.2.3