diff options
author | Seivan Heidari <[email protected]> | 2019-11-09 15:27:40 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-09 15:27:40 +0000 |
commit | 529b227d42951feabf64c8c964b00e726dd92d46 (patch) | |
tree | d54ea1a30905d4fd8798129103bb13921fb55c94 /crates/ra_hir/src/expr | |
parent | 81662d23a64c7eb7ea10cb7bbf316f17d78dc4bc (diff) | |
parent | 9d786ea221b27fbdf7c7f7beea0290db448e0611 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index c14c2ab66..5a1eade2c 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -67,10 +67,7 @@ impl ExprScopes { | |||
67 | &self.scopes[scope].entries | 67 | &self.scopes[scope].entries |
68 | } | 68 | } |
69 | 69 | ||
70 | pub(crate) fn scope_chain<'a>( | 70 | pub(crate) fn scope_chain(&self, scope: Option<ScopeId>) -> impl Iterator<Item = ScopeId> + '_ { |
71 | &'a self, | ||
72 | scope: Option<ScopeId>, | ||
73 | ) -> impl Iterator<Item = ScopeId> + 'a { | ||
74 | std::iter::successors(scope, move |&scope| self.scopes[scope].parent) | 71 | std::iter::successors(scope, move |&scope| self.scopes[scope].parent) |
75 | } | 72 | } |
76 | 73 | ||