diff options
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r-- | crates/ra_hir_def/src/data.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs index c0b16b7fa..04bd4a305 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs | |||
@@ -105,7 +105,7 @@ pub struct TypeAliasData { | |||
105 | 105 | ||
106 | impl TypeAliasData { | 106 | impl TypeAliasData { |
107 | pub(crate) fn type_alias_data_query( | 107 | pub(crate) fn type_alias_data_query( |
108 | db: &impl DefDatabase, | 108 | db: &dyn DefDatabase, |
109 | typ: TypeAliasId, | 109 | typ: TypeAliasId, |
110 | ) -> Arc<TypeAliasData> { | 110 | ) -> Arc<TypeAliasData> { |
111 | let loc = typ.lookup(db); | 111 | let loc = typ.lookup(db); |
@@ -127,7 +127,7 @@ pub struct TraitData { | |||
127 | } | 127 | } |
128 | 128 | ||
129 | impl TraitData { | 129 | impl TraitData { |
130 | pub(crate) fn trait_data_query(db: &impl DefDatabase, tr: TraitId) -> Arc<TraitData> { | 130 | pub(crate) fn trait_data_query(db: &dyn DefDatabase, tr: TraitId) -> Arc<TraitData> { |
131 | let src = tr.lookup(db).source(db); | 131 | let src = tr.lookup(db).source(db); |
132 | let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); | 132 | let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); |
133 | let auto = src.value.is_auto(); | 133 | let auto = src.value.is_auto(); |
@@ -200,7 +200,7 @@ pub struct ImplData { | |||
200 | } | 200 | } |
201 | 201 | ||
202 | impl ImplData { | 202 | impl ImplData { |
203 | pub(crate) fn impl_data_query(db: &impl DefDatabase, id: ImplId) -> Arc<ImplData> { | 203 | pub(crate) fn impl_data_query(db: &dyn DefDatabase, id: ImplId) -> Arc<ImplData> { |
204 | let _p = profile("impl_data_query"); | 204 | let _p = profile("impl_data_query"); |
205 | let impl_loc = id.lookup(db); | 205 | let impl_loc = id.lookup(db); |
206 | let src = impl_loc.source(db); | 206 | let src = impl_loc.source(db); |
@@ -235,20 +235,20 @@ pub struct ConstData { | |||
235 | } | 235 | } |
236 | 236 | ||
237 | impl ConstData { | 237 | impl ConstData { |
238 | pub(crate) fn const_data_query(db: &impl DefDatabase, konst: ConstId) -> Arc<ConstData> { | 238 | pub(crate) fn const_data_query(db: &dyn DefDatabase, konst: ConstId) -> Arc<ConstData> { |
239 | let loc = konst.lookup(db); | 239 | let loc = konst.lookup(db); |
240 | let node = loc.source(db); | 240 | let node = loc.source(db); |
241 | let vis_default = RawVisibility::default_for_container(loc.container); | 241 | let vis_default = RawVisibility::default_for_container(loc.container); |
242 | Arc::new(ConstData::new(db, vis_default, node)) | 242 | Arc::new(ConstData::new(db, vis_default, node)) |
243 | } | 243 | } |
244 | 244 | ||
245 | pub(crate) fn static_data_query(db: &impl DefDatabase, konst: StaticId) -> Arc<ConstData> { | 245 | pub(crate) fn static_data_query(db: &dyn DefDatabase, konst: StaticId) -> Arc<ConstData> { |
246 | let node = konst.lookup(db).source(db); | 246 | let node = konst.lookup(db).source(db); |
247 | Arc::new(ConstData::new(db, RawVisibility::private(), node)) | 247 | Arc::new(ConstData::new(db, RawVisibility::private(), node)) |
248 | } | 248 | } |
249 | 249 | ||
250 | fn new<N: NameOwner + TypeAscriptionOwner + VisibilityOwner>( | 250 | fn new<N: NameOwner + TypeAscriptionOwner + VisibilityOwner>( |
251 | db: &impl DefDatabase, | 251 | db: &dyn DefDatabase, |
252 | vis_default: RawVisibility, | 252 | vis_default: RawVisibility, |
253 | node: InFile<N>, | 253 | node: InFile<N>, |
254 | ) -> ConstData { | 254 | ) -> ConstData { |
@@ -261,7 +261,7 @@ impl ConstData { | |||
261 | } | 261 | } |
262 | 262 | ||
263 | fn collect_impl_items_in_macros( | 263 | fn collect_impl_items_in_macros( |
264 | db: &impl DefDatabase, | 264 | db: &dyn DefDatabase, |
265 | module_id: ModuleId, | 265 | module_id: ModuleId, |
266 | impl_def: &InFile<ast::ItemList>, | 266 | impl_def: &InFile<ast::ItemList>, |
267 | id: ImplId, | 267 | id: ImplId, |
@@ -280,7 +280,7 @@ fn collect_impl_items_in_macros( | |||
280 | } | 280 | } |
281 | 281 | ||
282 | fn collect_impl_items_in_macro( | 282 | fn collect_impl_items_in_macro( |
283 | db: &impl DefDatabase, | 283 | db: &dyn DefDatabase, |
284 | expander: &mut Expander, | 284 | expander: &mut Expander, |
285 | m: ast::MacroCall, | 285 | m: ast::MacroCall, |
286 | id: ImplId, | 286 | id: ImplId, |
@@ -312,7 +312,7 @@ fn collect_impl_items_in_macro( | |||
312 | } | 312 | } |
313 | 313 | ||
314 | fn collect_impl_items( | 314 | fn collect_impl_items( |
315 | db: &impl DefDatabase, | 315 | db: &dyn DefDatabase, |
316 | impl_items: impl Iterator<Item = ImplItem>, | 316 | impl_items: impl Iterator<Item = ImplItem>, |
317 | file_id: crate::HirFileId, | 317 | file_id: crate::HirFileId, |
318 | id: ImplId, | 318 | id: ImplId, |