aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/body
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs11
-rw-r--r--crates/ra_hir_def/src/body/scope.rs2
2 files changed, 5 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 54b5591d3..6238de606 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -36,7 +36,7 @@ use crate::{
36}; 36};
37 37
38pub(super) fn lower( 38pub(super) fn lower(
39 db: &impl DefDatabase, 39 db: &dyn DefDatabase,
40 def: DefWithBodyId, 40 def: DefWithBodyId,
41 expander: Expander, 41 expander: Expander,
42 params: Option<ast::ParamList>, 42 params: Option<ast::ParamList>,
@@ -58,8 +58,8 @@ pub(super) fn lower(
58 .collect(params, body) 58 .collect(params, body)
59} 59}
60 60
61struct ExprCollector<DB> { 61struct ExprCollector<'a> {
62 db: DB, 62 db: &'a dyn DefDatabase,
63 def: DefWithBodyId, 63 def: DefWithBodyId,
64 expander: Expander, 64 expander: Expander,
65 65
@@ -67,10 +67,7 @@ struct ExprCollector<DB> {
67 source_map: BodySourceMap, 67 source_map: BodySourceMap,
68} 68}
69 69
70impl<'a, DB> ExprCollector<&'a DB> 70impl ExprCollector<'_> {
71where
72 DB: DefDatabase,
73{
74 fn collect( 71 fn collect(
75 mut self, 72 mut self,
76 param_list: Option<ast::ParamList>, 73 param_list: Option<ast::ParamList>,
diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs
index a58a7b21f..7c3db8869 100644
--- a/crates/ra_hir_def/src/body/scope.rs
+++ b/crates/ra_hir_def/src/body/scope.rs
@@ -45,7 +45,7 @@ pub struct ScopeData {
45} 45}
46 46
47impl ExprScopes { 47impl ExprScopes {
48 pub(crate) fn expr_scopes_query(db: &impl DefDatabase, def: DefWithBodyId) -> Arc<ExprScopes> { 48 pub(crate) fn expr_scopes_query(db: &dyn DefDatabase, def: DefWithBodyId) -> Arc<ExprScopes> {
49 let body = db.body(def); 49 let body = db.body(def);
50 Arc::new(ExprScopes::new(&*body)) 50 Arc::new(ExprScopes::new(&*body))
51 } 51 }