mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Add doc-comments to the new files
This commit is contained in:
parent
af7175f332
commit
2a214e15d3
6 changed files with 17 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue