aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/render/function.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-22 16:16:22 +0000
committerGitHub <[email protected]>2021-01-22 16:16:22 +0000
commite73cc8b4abed6e6f5d801d0032070fa9fc662ec3 (patch)
tree36ded65537cecddefb5ef91962e9770243d44f4b /crates/completion/src/render/function.rs
parentb16add934d3cb4817ec0f20b8697a4d9701fce4e (diff)
parent96197e08730a74bb8d5c724968c99d22aa0ca17a (diff)
Merge #7396
7396: More annoying asserts r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/completion/src/render/function.rs')
-rw-r--r--crates/completion/src/render/function.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/completion/src/render/function.rs b/crates/completion/src/render/function.rs
index 2d616b1fb..e46e21d24 100644
--- a/crates/completion/src/render/function.rs
+++ b/crates/completion/src/render/function.rs
@@ -1,8 +1,8 @@
1//! Renderer for function calls. 1//! Renderer for function calls.
2 2
3use hir::{HasSource, Type}; 3use hir::{HasSource, HirDisplay, Type};
4use ide_db::SymbolKind; 4use ide_db::SymbolKind;
5use syntax::{ast::Fn, display::function_declaration}; 5use syntax::ast::Fn;
6use test_utils::mark; 6use test_utils::mark;
7 7
8use crate::{ 8use crate::{
@@ -55,7 +55,8 @@ impl<'a> FunctionRender<'a> {
55 } 55 }
56 56
57 fn detail(&self) -> String { 57 fn detail(&self) -> String {
58 function_declaration(&self.ast_node) 58 let ty = self.func.ret_type(self.ctx.db());
59 format!("-> {}", ty.display(self.ctx.db()))
59 } 60 }
60 61
61 fn add_arg(&self, arg: &str, ty: &Type) -> String { 62 fn add_arg(&self, arg: &str, ty: &Type) -> String {