From 08ea2271e8050165d0aaf4c994ed3dd746aff3ba Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 12:06:38 +0200 Subject: Rename TypeRef -> Type The TypeRef name comes from IntelliJ days, where you often have both type *syntax* as well as *semantical* representation of types in scope. And naming both Type is confusing. In rust-analyzer however, we use ast types as `ast::Type`, and have many more semantic counterparts to ast types, so avoiding name clash here is just confusing. --- crates/ra_hir_def/src/item_tree/lower.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_def/src/item_tree/lower.rs') diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index feb31579e..b5d416acb 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs @@ -648,10 +648,10 @@ impl Ctx { self.data().vis.alloc(vis) } - fn lower_type_ref(&self, type_ref: &ast::TypeRef) -> TypeRef { + fn lower_type_ref(&self, type_ref: &ast::Type) -> TypeRef { TypeRef::from_ast(&self.body_ctx, type_ref.clone()) } - fn lower_type_ref_opt(&self, type_ref: Option) -> TypeRef { + fn lower_type_ref_opt(&self, type_ref: Option) -> TypeRef { type_ref.map(|ty| self.lower_type_ref(&ty)).unwrap_or(TypeRef::Error) } -- cgit v1.2.3