From f78de3bb95acb996102a74b5b12d33054ba6d4c4 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 18 Apr 2020 19:26:35 +0800 Subject: Ignore proc-macro in completion --- crates/ra_ide/src/completion/presentation.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 55f75b15a..2189cef65 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs @@ -156,6 +156,12 @@ impl Completions { name: Option, macro_: hir::MacroDef, ) { + // FIXME: Currently proc-macro do not have ast-node, + // such that it does not have source + if macro_.is_proc_macro() { + return; + } + let name = match name { Some(it) => it, None => return, -- cgit v1.2.3