mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Better interface for doc comment and attribute processing
This commit is contained in:
parent
69dbfc7754
commit
08adce61a1
5 changed files with 66 additions and 64 deletions
|
@ -772,3 +772,13 @@ impl ast::HasLoopBody for ast::ForExpr {
|
|||
}
|
||||
|
||||
impl ast::HasAttrs for ast::AnyHasDocComments {}
|
||||
|
||||
impl From<ast::Adt> for ast::Item {
|
||||
fn from(it: ast::Adt) -> Self {
|
||||
match it {
|
||||
ast::Adt::Enum(it) => ast::Item::Enum(it),
|
||||
ast::Adt::Struct(it) => ast::Item::Struct(it),
|
||||
ast::Adt::Union(it) => ast::Item::Union(it),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue