diff options
Diffstat (limited to 'crates/ra_hir_def/src/lang_item.rs')
-rw-r--r-- | crates/ra_hir_def/src/lang_item.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs index 4c1a764ea..df951c533 100644 --- a/crates/ra_hir_def/src/lang_item.rs +++ b/crates/ra_hir_def/src/lang_item.rs | |||
@@ -8,7 +8,7 @@ use ra_syntax::SmolStr; | |||
8 | use rustc_hash::FxHashMap; | 8 | use rustc_hash::FxHashMap; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | db::DefDatabase2, AdtId, AttrDefId, CrateId, EnumId, FunctionId, ImplId, ModuleDefId, ModuleId, | 11 | db::DefDatabase, AdtId, AttrDefId, CrateId, EnumId, FunctionId, ImplId, ModuleDefId, ModuleId, |
12 | StaticId, StructId, TraitId, | 12 | StaticId, StructId, TraitId, |
13 | }; | 13 | }; |
14 | 14 | ||
@@ -33,7 +33,7 @@ impl LangItems { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | /// Salsa query. This will look for lang items in a specific crate. | 35 | /// Salsa query. This will look for lang items in a specific crate. |
36 | pub(crate) fn crate_lang_items_query(db: &impl DefDatabase2, krate: CrateId) -> Arc<LangItems> { | 36 | pub(crate) fn crate_lang_items_query(db: &impl DefDatabase, krate: CrateId) -> Arc<LangItems> { |
37 | let mut lang_items = LangItems::default(); | 37 | let mut lang_items = LangItems::default(); |
38 | 38 | ||
39 | let crate_def_map = db.crate_def_map(krate); | 39 | let crate_def_map = db.crate_def_map(krate); |
@@ -47,7 +47,7 @@ impl LangItems { | |||
47 | } | 47 | } |
48 | 48 | ||
49 | pub(crate) fn module_lang_items_query( | 49 | pub(crate) fn module_lang_items_query( |
50 | db: &impl DefDatabase2, | 50 | db: &impl DefDatabase, |
51 | module: ModuleId, | 51 | module: ModuleId, |
52 | ) -> Option<Arc<LangItems>> { | 52 | ) -> Option<Arc<LangItems>> { |
53 | let mut lang_items = LangItems::default(); | 53 | let mut lang_items = LangItems::default(); |
@@ -62,7 +62,7 @@ impl LangItems { | |||
62 | /// Salsa query. Look for a lang item, starting from the specified crate and recursively | 62 | /// Salsa query. Look for a lang item, starting from the specified crate and recursively |
63 | /// traversing its dependencies. | 63 | /// traversing its dependencies. |
64 | pub(crate) fn lang_item_query( | 64 | pub(crate) fn lang_item_query( |
65 | db: &impl DefDatabase2, | 65 | db: &impl DefDatabase, |
66 | start_crate: CrateId, | 66 | start_crate: CrateId, |
67 | item: SmolStr, | 67 | item: SmolStr, |
68 | ) -> Option<LangItemTarget> { | 68 | ) -> Option<LangItemTarget> { |
@@ -76,7 +76,7 @@ impl LangItems { | |||
76 | .find_map(|dep| db.lang_item(dep.crate_id, item.clone())) | 76 | .find_map(|dep| db.lang_item(dep.crate_id, item.clone())) |
77 | } | 77 | } |
78 | 78 | ||
79 | fn collect_lang_items(&mut self, db: &impl DefDatabase2, module: ModuleId) { | 79 | fn collect_lang_items(&mut self, db: &impl DefDatabase, module: ModuleId) { |
80 | // Look for impl targets | 80 | // Look for impl targets |
81 | let def_map = db.crate_def_map(module.krate); | 81 | let def_map = db.crate_def_map(module.krate); |
82 | let module_data = &def_map[module.module_id]; | 82 | let module_data = &def_map[module.module_id]; |
@@ -106,7 +106,7 @@ impl LangItems { | |||
106 | 106 | ||
107 | fn collect_lang_item<T>( | 107 | fn collect_lang_item<T>( |
108 | &mut self, | 108 | &mut self, |
109 | db: &impl DefDatabase2, | 109 | db: &impl DefDatabase, |
110 | item: T, | 110 | item: T, |
111 | constructor: fn(T) -> LangItemTarget, | 111 | constructor: fn(T) -> LangItemTarget, |
112 | ) where | 112 | ) where |