mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Don't label derive macros with their banged_name
This commit is contained in:
parent
80fdb13c47
commit
439ae17e1b
1 changed files with 5 additions and 1 deletions
|
@ -74,7 +74,11 @@ impl<'a> MacroRender<'a> {
|
||||||
if self.needs_bang() && self.ctx.snippet_cap().is_some() {
|
if self.needs_bang() && self.ctx.snippet_cap().is_some() {
|
||||||
format!("{}!{}…{}", self.name, self.bra, self.ket)
|
format!("{}!{}…{}", self.name, self.bra, self.ket)
|
||||||
} else {
|
} else {
|
||||||
self.banged_name()
|
if self.macro_.kind() == hir::MacroKind::Derive {
|
||||||
|
self.name.to_string()
|
||||||
|
} else {
|
||||||
|
self.banged_name()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue