diff options
author | Lukas Wirth <[email protected]> | 2021-05-28 13:55:12 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-05-28 13:59:24 +0100 |
commit | 439ae17e1b65d646c9b823b1dd752f26e761c33e (patch) | |
tree | f8b25a473765662941cc09d758b08b89c0f14aac /crates/ide_completion | |
parent | 80fdb13c475928c077fe2801fbc195c92128cd63 (diff) |
Don't label derive macros with their banged_name
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/render/macro_.rs | 6 |
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 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> { | |||
74 | if self.needs_bang() && self.ctx.snippet_cap().is_some() { | 74 | if self.needs_bang() && self.ctx.snippet_cap().is_some() { |
75 | format!("{}!{}…{}", self.name, self.bra, self.ket) | 75 | format!("{}!{}…{}", self.name, self.bra, self.ket) |
76 | } else { | 76 | } else { |
77 | self.banged_name() | 77 | if self.macro_.kind() == hir::MacroKind::Derive { |
78 | self.name.to_string() | ||
79 | } else { | ||
80 | self.banged_name() | ||
81 | } | ||
78 | } | 82 | } |
79 | } | 83 | } |
80 | 84 | ||