diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 14:39:55 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 14:39:55 +0100 |
commit | 97fb5daf723c520b0361ade3e44f130257b1fe96 (patch) | |
tree | 82f372ea7b9560cf8fbf861203460fe2aa2d4c88 /crates/ra_hir_def | |
parent | ee00679331b87dacc5fe608f153be160c1cb144c (diff) | |
parent | 28ef4c375a9f56d69daf885504aea3df7012bb81 (diff) |
Merge #5592
5592: Rename TypeParamList -> GenericParamList r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 8 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 6a0f493a7..5fa2fbb3f 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs | |||
@@ -12,7 +12,7 @@ use hir_expand::{ | |||
12 | use ra_arena::{map::ArenaMap, Arena}; | 12 | use ra_arena::{map::ArenaMap, Arena}; |
13 | use ra_db::FileId; | 13 | use ra_db::FileId; |
14 | use ra_prof::profile; | 14 | use ra_prof::profile; |
15 | use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner}; | 15 | use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; |
16 | 16 | ||
17 | use crate::{ | 17 | use crate::{ |
18 | body::LowerCtx, | 18 | body::LowerCtx, |
@@ -205,9 +205,9 @@ impl GenericParams { | |||
205 | &mut self, | 205 | &mut self, |
206 | lower_ctx: &LowerCtx, | 206 | lower_ctx: &LowerCtx, |
207 | sm: &mut SourceMap, | 207 | sm: &mut SourceMap, |
208 | node: &dyn TypeParamsOwner, | 208 | node: &dyn GenericParamsOwner, |
209 | ) { | 209 | ) { |
210 | if let Some(params) = node.type_param_list() { | 210 | if let Some(params) = node.generic_param_list() { |
211 | self.fill_params(lower_ctx, sm, params) | 211 | self.fill_params(lower_ctx, sm, params) |
212 | } | 212 | } |
213 | if let Some(where_clause) = node.where_clause() { | 213 | if let Some(where_clause) = node.where_clause() { |
@@ -232,7 +232,7 @@ impl GenericParams { | |||
232 | &mut self, | 232 | &mut self, |
233 | lower_ctx: &LowerCtx, | 233 | lower_ctx: &LowerCtx, |
234 | sm: &mut SourceMap, | 234 | sm: &mut SourceMap, |
235 | params: ast::TypeParamList, | 235 | params: ast::GenericParamList, |
236 | ) { | 236 | ) { |
237 | for type_param in params.type_params() { | 237 | for type_param in params.type_params() { |
238 | let name = type_param.name().map_or_else(Name::missing, |it| it.as_name()); | 238 | let name = type_param.name().map_or_else(Name::missing, |it| it.as_name()); |
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index 4cfc68f53..19d165b5b 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs | |||
@@ -568,10 +568,10 @@ impl Ctx { | |||
568 | fn lower_generic_params_and_inner_items( | 568 | fn lower_generic_params_and_inner_items( |
569 | &mut self, | 569 | &mut self, |
570 | owner: GenericsOwner<'_>, | 570 | owner: GenericsOwner<'_>, |
571 | node: &impl ast::TypeParamsOwner, | 571 | node: &impl ast::GenericParamsOwner, |
572 | ) -> GenericParamsId { | 572 | ) -> GenericParamsId { |
573 | // Generics are part of item headers and may contain inner items we need to collect. | 573 | // Generics are part of item headers and may contain inner items we need to collect. |
574 | if let Some(params) = node.type_param_list() { | 574 | if let Some(params) = node.generic_param_list() { |
575 | self.collect_inner_items(params.syntax()); | 575 | self.collect_inner_items(params.syntax()); |
576 | } | 576 | } |
577 | if let Some(clause) = node.where_clause() { | 577 | if let Some(clause) = node.where_clause() { |
@@ -584,7 +584,7 @@ impl Ctx { | |||
584 | fn lower_generic_params( | 584 | fn lower_generic_params( |
585 | &mut self, | 585 | &mut self, |
586 | owner: GenericsOwner<'_>, | 586 | owner: GenericsOwner<'_>, |
587 | node: &impl ast::TypeParamsOwner, | 587 | node: &impl ast::GenericParamsOwner, |
588 | ) -> GenericParamsId { | 588 | ) -> GenericParamsId { |
589 | let mut sm = &mut ArenaMap::default(); | 589 | let mut sm = &mut ArenaMap::default(); |
590 | let mut generics = GenericParams::default(); | 590 | let mut generics = GenericParams::default(); |