about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2021-05-28 14:55:12 +0200
committerLukas Wirth <lukastw97@gmail.com>2021-05-28 14:59:24 +0200
commit439ae17e1b65d646c9b823b1dd752f26e761c33e (patch)
treef8b25a473765662941cc09d758b08b89c0f14aac
parent80fdb13c475928c077fe2801fbc195c92128cd63 (diff)
Don't label derive macros with their banged_name
-rw-r--r--crates/ide_completion/src/render/macro_.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide_completion/src/render/macro_.rs b/crates/ide_completion/src/render/macro_.rs
index 7578ad50b4c..b90fd3890db 100644
--- a/crates/ide_completion/src/render/macro_.rs
+++ b/crates/ide_completion/src/render/macro_.rs
@@ -74,7 +74,11 @@ impl<'a> MacroRender<'a> {
         if self.needs_bang() && self.ctx.snippet_cap().is_some() {
             format!("{}!{}…{}", self.name, self.bra, self.ket)
         } else {
-            self.banged_name()
+            if self.macro_.kind() == hir::MacroKind::Derive {
+                self.name.to_string()
+            } else {
+                self.banged_name()
+            }
         }
     }