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
|
@ -73,10 +73,14 @@ impl<'a> MacroRender<'a> {
|
|||
fn label(&self) -> String {
|
||||
if self.needs_bang() && self.ctx.snippet_cap().is_some() {
|
||||
format!("{}!{}…{}", self.name, self.bra, self.ket)
|
||||
} else {
|
||||
if self.macro_.kind() == hir::MacroKind::Derive {
|
||||
self.name.to_string()
|
||||
} else {
|
||||
self.banged_name()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn snippet(&self) -> String {
|
||||
format!("{}!{}$0{}", self.name, self.bra, self.ket)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue