mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Properly fetch inner and outer docs on hir-level
This commit is contained in:
parent
eac77997bf
commit
f8823e8cbc
2 changed files with 33 additions and 17 deletions
|
@ -17,6 +17,14 @@ impl ast::Comment {
|
|||
CommentKind::from_text(self.text())
|
||||
}
|
||||
|
||||
pub fn is_inner(&self) -> bool {
|
||||
self.kind().doc == Some(CommentPlacement::Inner)
|
||||
}
|
||||
|
||||
pub fn is_outer(&self) -> bool {
|
||||
self.kind().doc == Some(CommentPlacement::Outer)
|
||||
}
|
||||
|
||||
pub fn prefix(&self) -> &'static str {
|
||||
let &(prefix, _kind) = CommentKind::BY_PREFIX
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue