diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_item.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/completion_item.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index e7fa967a0..9ce778487 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -37,6 +37,7 @@ pub enum CompletionItemKind { | |||
37 | Const, | 37 | Const, |
38 | Trait, | 38 | Trait, |
39 | TypeAlias, | 39 | TypeAlias, |
40 | Method, | ||
40 | } | 41 | } |
41 | 42 | ||
42 | #[derive(Debug, PartialEq, Eq)] | 43 | #[derive(Debug, PartialEq, Eq)] |
@@ -183,7 +184,11 @@ impl Builder { | |||
183 | self | 184 | self |
184 | } | 185 | } |
185 | 186 | ||
186 | fn from_function(mut self, ctx: &CompletionContext, function: hir::Function) -> Builder { | 187 | pub(super) fn from_function( |
188 | mut self, | ||
189 | ctx: &CompletionContext, | ||
190 | function: hir::Function, | ||
191 | ) -> Builder { | ||
187 | // If not an import, add parenthesis automatically. | 192 | // If not an import, add parenthesis automatically. |
188 | if ctx.use_item_syntax.is_none() && !ctx.is_call { | 193 | if ctx.use_item_syntax.is_none() && !ctx.is_call { |
189 | if function.signature(ctx.db).args().is_empty() { | 194 | if function.signature(ctx.db).args().is_empty() { |