diff options
author | Lenard Pratt <[email protected]> | 2019-03-30 10:50:00 +0000 |
---|---|---|
committer | Lenard Pratt <[email protected]> | 2019-03-30 10:50:00 +0000 |
commit | 7f3bf7cc738d02fde80d4fde9f32cbbe72896b87 (patch) | |
tree | e4a3e7121fd4dd8971f0028177b777a77cdcc6c0 /crates/ra_hir/src/expr | |
parent | 2a770190b07ee43364a66a65b886f7efa822ec6f (diff) |
Added defWithBody
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index ed005c9f7..539da06c3 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -10,7 +10,7 @@ use ra_syntax::{ | |||
10 | use ra_arena::{Arena, RawId, impl_arena_id}; | 10 | use ra_arena::{Arena, RawId, impl_arena_id}; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | Name, AsName, Function, | 13 | Name, AsName, Function,DefWithBody, |
14 | expr::{PatId, ExprId, Pat, Expr, Body, Statement, BodySourceMap}, | 14 | expr::{PatId, ExprId, Pat, Expr, Body, Statement, BodySourceMap}, |
15 | HirDatabase, | 15 | HirDatabase, |
16 | }; | 16 | }; |
@@ -40,8 +40,8 @@ pub struct ScopeData { | |||
40 | 40 | ||
41 | impl ExprScopes { | 41 | impl ExprScopes { |
42 | // FIXME: This should take something more general than Function | 42 | // FIXME: This should take something more general than Function |
43 | pub(crate) fn expr_scopes_query(db: &impl HirDatabase, function: Function) -> Arc<ExprScopes> { | 43 | pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<ExprScopes> { |
44 | let body = db.body_hir(function); | 44 | let body = db.body_hir(def); |
45 | let res = ExprScopes::new(body); | 45 | let res = ExprScopes::new(body); |
46 | Arc::new(res) | 46 | Arc::new(res) |
47 | } | 47 | } |