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_ide/src/display.rs | 2 +- crates/ra_ide/src/file_structure.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs index 3efca0649..fd42aa435 100644 --- a/crates/ra_ide/src/display.rs +++ b/crates/ra_ide/src/display.rs @@ -44,7 +44,7 @@ pub(crate) fn function_declaration(node: &ast::Fn) -> String { format_to!(buf, "{}", param_list); } if let Some(ret_type) = node.ret_type() { - if ret_type.type_ref().is_some() { + if ret_type.ty().is_some() { format_to!(buf, " {}", ret_type); } } diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs index 22cf8637a..91765140a 100644 --- a/crates/ra_ide/src/file_structure.rs +++ b/crates/ra_ide/src/file_structure.rs @@ -125,7 +125,7 @@ fn structure_node(node: &SyntaxNode) -> Option { ast::Variant(it) => decl(it), ast::Trait(it) => decl(it), ast::Module(it) => decl(it), - ast::TypeAlias(it) => decl_with_type_ref(&it, it.type_ref()), + ast::TypeAlias(it) => decl_with_type_ref(&it, it.ty()), ast::RecordField(it) => decl_with_type_ref(&it, it.ty()), ast::Const(it) => decl_with_type_ref(&it, it.ty()), ast::Static(it) => decl_with_type_ref(&it, it.ty()), -- cgit v1.2.3