mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add documents owner for ImplDef and SourceFile
This commit is contained in:
parent
2474f42ae9
commit
f90fbaf6a6
2 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,7 @@ pub struct SourceFile {
|
||||||
}
|
}
|
||||||
impl ast::ModuleItemOwner for SourceFile {}
|
impl ast::ModuleItemOwner for SourceFile {}
|
||||||
impl ast::AttrsOwner for SourceFile {}
|
impl ast::AttrsOwner for SourceFile {}
|
||||||
|
impl ast::DocCommentsOwner for SourceFile {}
|
||||||
impl SourceFile {
|
impl SourceFile {
|
||||||
pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) }
|
pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) }
|
||||||
}
|
}
|
||||||
|
@ -259,6 +260,7 @@ pub struct ImplDef {
|
||||||
}
|
}
|
||||||
impl ast::TypeParamsOwner for ImplDef {}
|
impl ast::TypeParamsOwner for ImplDef {}
|
||||||
impl ast::AttrsOwner for ImplDef {}
|
impl ast::AttrsOwner for ImplDef {}
|
||||||
|
impl ast::DocCommentsOwner for ImplDef {}
|
||||||
impl ImplDef {
|
impl ImplDef {
|
||||||
pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
|
pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
|
||||||
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
||||||
|
|
|
@ -305,7 +305,7 @@ macro_rules! ast_enums {
|
||||||
pub(crate) const AST_SRC: AstSrc = AstSrc {
|
pub(crate) const AST_SRC: AstSrc = AstSrc {
|
||||||
tokens: &["Whitespace", "Comment", "String", "RawString"],
|
tokens: &["Whitespace", "Comment", "String", "RawString"],
|
||||||
nodes: &ast_nodes! {
|
nodes: &ast_nodes! {
|
||||||
struct SourceFile: ModuleItemOwner, AttrsOwner {
|
struct SourceFile: ModuleItemOwner, AttrsOwner, DocCommentsOwner {
|
||||||
modules: [Module],
|
modules: [Module],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
|
||||||
T![;]
|
T![;]
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ImplDef: TypeParamsOwner, AttrsOwner {
|
struct ImplDef: TypeParamsOwner, AttrsOwner, DocCommentsOwner {
|
||||||
T![default],
|
T![default],
|
||||||
T![const],
|
T![const],
|
||||||
T![unsafe],
|
T![unsafe],
|
||||||
|
|
Loading…
Reference in a new issue