aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/generics.rs')
-rw-r--r--crates/ra_hir_def/src/generics.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs
index 519c60de0..24adc8153 100644
--- a/crates/ra_hir_def/src/generics.rs
+++ b/crates/ra_hir_def/src/generics.rs
@@ -69,7 +69,7 @@ type SourceMap = ArenaMap<LocalTypeParamId, Either<ast::TraitDef, ast::TypeParam
69 69
70impl GenericParams { 70impl GenericParams {
71 pub(crate) fn generic_params_query( 71 pub(crate) fn generic_params_query(
72 db: &impl DefDatabase, 72 db: &dyn DefDatabase,
73 def: GenericDefId, 73 def: GenericDefId,
74 ) -> Arc<GenericParams> { 74 ) -> Arc<GenericParams> {
75 let _p = profile("generic_params_query"); 75 let _p = profile("generic_params_query");
@@ -77,7 +77,7 @@ impl GenericParams {
77 Arc::new(params) 77 Arc::new(params)
78 } 78 }
79 79
80 fn new(db: &impl DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) { 80 fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) {
81 let mut generics = GenericParams { types: Arena::default(), where_predicates: Vec::new() }; 81 let mut generics = GenericParams { types: Arena::default(), where_predicates: Vec::new() };
82 let mut sm = ArenaMap::default(); 82 let mut sm = ArenaMap::default();
83 // FIXME: add `: Sized` bound for everything except for `Self` in traits 83 // FIXME: add `: Sized` bound for everything except for `Self` in traits
@@ -242,14 +242,14 @@ impl GenericParams {
242impl HasChildSource for GenericDefId { 242impl HasChildSource for GenericDefId {
243 type ChildId = LocalTypeParamId; 243 type ChildId = LocalTypeParamId;
244 type Value = Either<ast::TraitDef, ast::TypeParam>; 244 type Value = Either<ast::TraitDef, ast::TypeParam>;
245 fn child_source(&self, db: &impl DefDatabase) -> InFile<SourceMap> { 245 fn child_source(&self, db: &dyn DefDatabase) -> InFile<SourceMap> {
246 let (_, sm) = GenericParams::new(db, *self); 246 let (_, sm) = GenericParams::new(db, *self);
247 sm 247 sm
248 } 248 }
249} 249}
250 250
251impl ChildBySource for GenericDefId { 251impl ChildBySource for GenericDefId {
252 fn child_by_source(&self, db: &impl DefDatabase) -> DynMap { 252 fn child_by_source(&self, db: &dyn DefDatabase) -> DynMap {
253 let mut res = DynMap::default(); 253 let mut res = DynMap::default();
254 let arena_map = self.child_source(db); 254 let arena_map = self.child_source(db);
255 let arena_map = arena_map.as_ref(); 255 let arena_map = arena_map.as_ref();