diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 20:03:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 20:03:25 +0100 |
commit | 239dd506f68db0cbe4417b6e5c7f737d8ff8a159 (patch) | |
tree | dd3503a2be3a6699a6b111844dbcdc85b37e2425 /crates/ra_ide | |
parent | 134d3c3c5068abc5ed3e03fe5df2b524ea70753d (diff) | |
parent | f95f425ae4199e814e6956be1d9bb59a14758c07 (diff) |
Merge #5613
5613: Use ty to access most TypeRefs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/display.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/file_structure.rs | 2 |
2 files changed, 2 insertions, 2 deletions
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 { | |||
44 | format_to!(buf, "{}", param_list); | 44 | format_to!(buf, "{}", param_list); |
45 | } | 45 | } |
46 | if let Some(ret_type) = node.ret_type() { | 46 | if let Some(ret_type) = node.ret_type() { |
47 | if ret_type.type_ref().is_some() { | 47 | if ret_type.ty().is_some() { |
48 | format_to!(buf, " {}", ret_type); | 48 | format_to!(buf, " {}", ret_type); |
49 | } | 49 | } |
50 | } | 50 | } |
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<StructureNode> { | |||
125 | ast::Variant(it) => decl(it), | 125 | ast::Variant(it) => decl(it), |
126 | ast::Trait(it) => decl(it), | 126 | ast::Trait(it) => decl(it), |
127 | ast::Module(it) => decl(it), | 127 | ast::Module(it) => decl(it), |
128 | ast::TypeAlias(it) => decl_with_type_ref(&it, it.type_ref()), | 128 | ast::TypeAlias(it) => decl_with_type_ref(&it, it.ty()), |
129 | ast::RecordField(it) => decl_with_type_ref(&it, it.ty()), | 129 | ast::RecordField(it) => decl_with_type_ref(&it, it.ty()), |
130 | ast::Const(it) => decl_with_type_ref(&it, it.ty()), | 130 | ast::Const(it) => decl_with_type_ref(&it, it.ty()), |
131 | ast::Static(it) => decl_with_type_ref(&it, it.ty()), | 131 | ast::Static(it) => decl_with_type_ref(&it, it.ty()), |