From 28ef4c375a9f56d69daf885504aea3df7012bb81 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 15:36:21 +0200 Subject: Rename TypeParamList -> GenericParamList --- crates/ra_hir_def/src/generics.rs | 8 ++++---- crates/ra_hir_def/src/item_tree/lower.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir_def') 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::{ use ra_arena::{map::ArenaMap, Arena}; use ra_db::FileId; use ra_prof::profile; -use ra_syntax::ast::{self, NameOwner, TypeBoundsOwner, TypeParamsOwner}; +use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; use crate::{ body::LowerCtx, @@ -205,9 +205,9 @@ impl GenericParams { &mut self, lower_ctx: &LowerCtx, sm: &mut SourceMap, - node: &dyn TypeParamsOwner, + node: &dyn GenericParamsOwner, ) { - if let Some(params) = node.type_param_list() { + if let Some(params) = node.generic_param_list() { self.fill_params(lower_ctx, sm, params) } if let Some(where_clause) = node.where_clause() { @@ -232,7 +232,7 @@ impl GenericParams { &mut self, lower_ctx: &LowerCtx, sm: &mut SourceMap, - params: ast::TypeParamList, + params: ast::GenericParamList, ) { for type_param in params.type_params() { 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 { fn lower_generic_params_and_inner_items( &mut self, owner: GenericsOwner<'_>, - node: &impl ast::TypeParamsOwner, + node: &impl ast::GenericParamsOwner, ) -> GenericParamsId { // Generics are part of item headers and may contain inner items we need to collect. - if let Some(params) = node.type_param_list() { + if let Some(params) = node.generic_param_list() { self.collect_inner_items(params.syntax()); } if let Some(clause) = node.where_clause() { @@ -584,7 +584,7 @@ impl Ctx { fn lower_generic_params( &mut self, owner: GenericsOwner<'_>, - node: &impl ast::TypeParamsOwner, + node: &impl ast::GenericParamsOwner, ) -> GenericParamsId { let mut sm = &mut ArenaMap::default(); let mut generics = GenericParams::default(); -- cgit v1.2.3