From fc1e543f7abb69b8cab308410fa0a127950ee1c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Nov 2019 14:44:43 +0300 Subject: Get rid of DefDatabase2 --- crates/ra_hir_def/src/body/lower.rs | 6 +++--- crates/ra_hir_def/src/body/scope.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir_def/src/body') diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index d8e911aa5..f4640dfa4 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs @@ -17,7 +17,7 @@ use test_utils::tested_by; use crate::{ body::{Body, BodySourceMap, Expander, PatPtr}, builtin_type::{BuiltinFloat, BuiltinInt}, - db::DefDatabase2, + db::DefDatabase, expr::{ ArithOp, Array, BinaryOp, BindingAnnotation, CmpOp, Expr, ExprId, Literal, LogicOp, MatchArm, Ordering, Pat, PatId, RecordFieldPat, RecordLitField, Statement, @@ -28,7 +28,7 @@ use crate::{ }; pub(super) fn lower( - db: &impl DefDatabase2, + db: &impl DefDatabase, expander: Expander, params: Option, body: Option, @@ -57,7 +57,7 @@ struct ExprCollector { impl<'a, DB> ExprCollector<&'a DB> where - DB: DefDatabase2, + DB: DefDatabase, { fn collect( mut self, diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 58740b679..20d707bc4 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs @@ -7,7 +7,7 @@ use rustc_hash::FxHashMap; use crate::{ body::Body, - db::DefDatabase2, + db::DefDatabase, expr::{Expr, ExprId, Pat, PatId, Statement}, DefWithBodyId, }; @@ -45,7 +45,7 @@ pub struct ScopeData { } impl ExprScopes { - pub(crate) fn expr_scopes_query(db: &impl DefDatabase2, def: DefWithBodyId) -> Arc { + pub(crate) fn expr_scopes_query(db: &impl DefDatabase, def: DefWithBodyId) -> Arc { let body = db.body(def); Arc::new(ExprScopes::new(&*body)) } @@ -176,7 +176,7 @@ mod tests { use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; use test_utils::{assert_eq_text, covers, extract_offset}; - use crate::{db::DefDatabase2, test_db::TestDB, FunctionId, ModuleDefId}; + use crate::{db::DefDatabase, test_db::TestDB, FunctionId, ModuleDefId}; fn find_function(db: &TestDB, file_id: FileId) -> FunctionId { let krate = db.test_crate(); -- cgit v1.2.3