From f95f425ae4199e814e6956be1d9bb59a14758c07 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 21:02:55 +0200 Subject: Use ty to access most TypeRefs --- crates/ra_hir_def/src/item_tree/lower.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_def/src/item_tree') diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index f0ced1f79..feb31579e 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs @@ -228,7 +228,7 @@ impl Ctx { fn lower_tuple_field(&mut self, idx: usize, field: &ast::TupleField) -> Field { let name = Name::new_tuple_field(idx); let visibility = self.lower_visibility(field); - let type_ref = self.lower_type_ref_opt(field.type_ref()); + let type_ref = self.lower_type_ref_opt(field.ty()); let res = Field { name, type_ref, visibility }; res } @@ -317,7 +317,7 @@ impl Ctx { } } - let ret_type = match func.ret_type().and_then(|rt| rt.type_ref()) { + let ret_type = match func.ret_type().and_then(|rt| rt.ty()) { Some(type_ref) => TypeRef::from_ast(&self.body_ctx, type_ref), _ => TypeRef::unit(), }; @@ -352,7 +352,7 @@ impl Ctx { type_alias: &ast::TypeAlias, ) -> Option> { let name = type_alias.name()?.as_name(); - let type_ref = type_alias.type_ref().map(|it| self.lower_type_ref(&it)); + let type_ref = type_alias.ty().map(|it| self.lower_type_ref(&it)); let visibility = self.lower_visibility(type_alias); let bounds = self.lower_type_bounds(type_alias); let generic_params = self.lower_generic_params(GenericsOwner::TypeAlias, type_alias); -- cgit v1.2.3