From 439ae17e1b65d646c9b823b1dd752f26e761c33e Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 28 May 2021 14:55:12 +0200 Subject: Don't label derive macros with their banged_name --- crates/ide_completion/src/render/macro_.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/ide_completion/src/render/macro_.rs b/crates/ide_completion/src/render/macro_.rs index 7578ad50b..b90fd3890 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() + } } } -- cgit v1.2.3