aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r--crates/ra_hir_def/src/data.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 91bac7415..f0b3e198a 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -9,7 +9,7 @@ use hir_expand::{
9use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; 9use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner};
10 10
11use crate::{ 11use crate::{
12 db::DefDatabase2, 12 db::DefDatabase,
13 type_ref::{Mutability, TypeRef}, 13 type_ref::{Mutability, TypeRef},
14 AssocItemId, AstItemDef, ConstId, ConstLoc, ContainerId, FunctionId, FunctionLoc, HasSource, 14 AssocItemId, AstItemDef, ConstId, ConstLoc, ContainerId, FunctionId, FunctionLoc, HasSource,
15 ImplId, Intern, Lookup, StaticId, TraitId, TypeAliasId, TypeAliasLoc, 15 ImplId, Intern, Lookup, StaticId, TraitId, TypeAliasId, TypeAliasLoc,
@@ -26,7 +26,7 @@ pub struct FunctionData {
26} 26}
27 27
28impl FunctionData { 28impl FunctionData {
29 pub(crate) fn fn_data_query(db: &impl DefDatabase2, func: FunctionId) -> Arc<FunctionData> { 29 pub(crate) fn fn_data_query(db: &impl DefDatabase, func: FunctionId) -> Arc<FunctionData> {
30 let src = func.lookup(db).source(db); 30 let src = func.lookup(db).source(db);
31 let name = src.value.name().map(|n| n.as_name()).unwrap_or_else(Name::missing); 31 let name = src.value.name().map(|n| n.as_name()).unwrap_or_else(Name::missing);
32 let mut params = Vec::new(); 32 let mut params = Vec::new();
@@ -74,7 +74,7 @@ pub struct TypeAliasData {
74 74
75impl TypeAliasData { 75impl TypeAliasData {
76 pub(crate) fn type_alias_data_query( 76 pub(crate) fn type_alias_data_query(
77 db: &impl DefDatabase2, 77 db: &impl DefDatabase,
78 typ: TypeAliasId, 78 typ: TypeAliasId,
79 ) -> Arc<TypeAliasData> { 79 ) -> Arc<TypeAliasData> {
80 let node = typ.lookup(db).source(db).value; 80 let node = typ.lookup(db).source(db).value;
@@ -92,7 +92,7 @@ pub struct TraitData {
92} 92}
93 93
94impl TraitData { 94impl TraitData {
95 pub(crate) fn trait_data_query(db: &impl DefDatabase2, tr: TraitId) -> Arc<TraitData> { 95 pub(crate) fn trait_data_query(db: &impl DefDatabase, tr: TraitId) -> Arc<TraitData> {
96 let src = tr.source(db); 96 let src = tr.source(db);
97 let name = src.value.name().map(|n| n.as_name()); 97 let name = src.value.name().map(|n| n.as_name());
98 let auto = src.value.is_auto(); 98 let auto = src.value.is_auto();
@@ -144,7 +144,7 @@ pub struct ImplData {
144} 144}
145 145
146impl ImplData { 146impl ImplData {
147 pub(crate) fn impl_data_query(db: &impl DefDatabase2, id: ImplId) -> Arc<ImplData> { 147 pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> {
148 let src = id.source(db); 148 let src = id.source(db);
149 let items = db.ast_id_map(src.file_id); 149 let items = db.ast_id_map(src.file_id);
150 150
@@ -198,12 +198,12 @@ pub struct ConstData {
198} 198}
199 199
200impl ConstData { 200impl ConstData {
201 pub(crate) fn const_data_query(db: &impl DefDatabase2, konst: ConstId) -> Arc<ConstData> { 201 pub(crate) fn const_data_query(db: &impl DefDatabase, konst: ConstId) -> Arc<ConstData> {
202 let node = konst.lookup(db).source(db).value; 202 let node = konst.lookup(db).source(db).value;
203 const_data_for(&node) 203 const_data_for(&node)
204 } 204 }
205 205
206 pub(crate) fn static_data_query(db: &impl DefDatabase2, konst: StaticId) -> Arc<ConstData> { 206 pub(crate) fn static_data_query(db: &impl DefDatabase, konst: StaticId) -> Arc<ConstData> {
207 let node = konst.source(db).value; 207 let node = konst.source(db).value;
208 const_data_for(&node) 208 const_data_for(&node)
209 } 209 }