aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-28 13:59:54 +0100
committerGitHub <[email protected]>2021-05-28 13:59:54 +0100
commit2968731fd58e86d994753af5f81e52230c34b240 (patch)
treedf2058f60bf5534e8b19f50b86e11093553596ec
parentb5d41ba0e2020f67764b34c152a0684464495ad6 (diff)
parent439ae17e1b65d646c9b823b1dd752f26e761c33e (diff)
Merge #9040
9040: Don't label derive macros with their banged_name r=Veykril a=Veykril cc https://github.com/rust-analyzer/rust-analyzer/issues/7072#issuecomment-850396203 This doesn't fix it non builtin derives yet I think cause of a FIXME somewhere that doesn't categorize proc-macro derives as derives yet bors r+ Co-authored-by: Lukas Wirth <[email protected]>
-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 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