Add doc-comments to the new files

This commit is contained in:
Igor Aleksanov 2020-11-01 13:48:42 +03:00
parent af7175f332
commit 2a214e15d3
6 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,5 @@
//! Renderer for macro invocations.
use hir::{Documentation, HasSource};
use syntax::display::macro_label;
use test_utils::mark;
@ -66,7 +68,11 @@ impl<'a> MacroRender<'a> {
}
fn label(&self) -> String {
format!("{}!{}{}", self.name, self.bra, self.ket)
if self.needs_bang() && self.ctx.snippet_cap().is_some() {
format!("{}!{}{}", self.name, self.bra, self.ket)
} else {
self.banged_name()
}
}
fn snippet(&self) -> String {