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 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir_def/src/generics.rs') 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()); -- cgit v1.2.3 From c83467796b6c7365ea4f41900d74444384a9e618 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:17:28 +0200 Subject: Finalize Trait grammar --- crates/ra_hir_def/src/generics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_def/src/generics.rs') diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 5fa2fbb3f..8ea61fcf2 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs @@ -66,7 +66,7 @@ pub enum WherePredicateTarget { TypeParam(LocalTypeParamId), } -type SourceMap = ArenaMap>; +type SourceMap = ArenaMap>; impl GenericParams { pub(crate) fn generic_params_query( @@ -317,7 +317,7 @@ impl GenericParams { impl HasChildSource for GenericDefId { type ChildId = LocalTypeParamId; - type Value = Either; + type Value = Either; fn child_source(&self, db: &dyn DefDatabase) -> InFile { let (_, sm) = GenericParams::new(db, *self); sm -- cgit v1.2.3