diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-22 16:16:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-22 16:16:22 +0000 |
commit | e73cc8b4abed6e6f5d801d0032070fa9fc662ec3 (patch) | |
tree | 36ded65537cecddefb5ef91962e9770243d44f4b /crates/completion/src/render | |
parent | b16add934d3cb4817ec0f20b8697a4d9701fce4e (diff) | |
parent | 96197e08730a74bb8d5c724968c99d22aa0ca17a (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')
-rw-r--r-- | crates/completion/src/render/function.rs | 7 |
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 | ||
3 | use hir::{HasSource, Type}; | 3 | use hir::{HasSource, HirDisplay, Type}; |
4 | use ide_db::SymbolKind; | 4 | use ide_db::SymbolKind; |
5 | use syntax::{ast::Fn, display::function_declaration}; | 5 | use syntax::ast::Fn; |
6 | use test_utils::mark; | 6 | use test_utils::mark; |
7 | 7 | ||
8 | use crate::{ | 8 | use 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 { |