From 7f3bf7cc738d02fde80d4fde9f32cbbe72896b87 Mon Sep 17 00:00:00 2001 From: Lenard Pratt Date: Sat, 30 Mar 2019 10:50:00 +0000 Subject: Added defWithBody --- crates/ra_hir/src/expr/scope.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/expr') 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::{ use ra_arena::{Arena, RawId, impl_arena_id}; use crate::{ - Name, AsName, Function, + Name, AsName, Function,DefWithBody, expr::{PatId, ExprId, Pat, Expr, Body, Statement, BodySourceMap}, HirDatabase, }; @@ -40,8 +40,8 @@ pub struct ScopeData { impl ExprScopes { // FIXME: This should take something more general than Function - pub(crate) fn expr_scopes_query(db: &impl HirDatabase, function: Function) -> Arc { - let body = db.body_hir(function); + pub(crate) fn expr_scopes_query(db: &impl HirDatabase, def: DefWithBody) -> Arc { + let body = db.body_hir(def); let res = ExprScopes::new(body); Arc::new(res) } -- cgit v1.2.3