diff options
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index a4b116941..31f5ecc44 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -180,3 +180,22 @@ impl<R: TreeRoot> AstNode<R> for Trait<R> { | |||
180 | impl<R: TreeRoot> ast::NameOwner<R> for Trait<R> {} | 180 | impl<R: TreeRoot> ast::NameOwner<R> for Trait<R> {} |
181 | impl<R: TreeRoot> Trait<R> {} | 181 | impl<R: TreeRoot> Trait<R> {} |
182 | 182 | ||
183 | // TypeItem | ||
184 | #[derive(Debug, Clone, Copy)] | ||
185 | pub struct TypeItem<R: TreeRoot = Arc<SyntaxRoot>> { | ||
186 | syntax: SyntaxNode<R>, | ||
187 | } | ||
188 | |||
189 | impl<R: TreeRoot> AstNode<R> for TypeItem<R> { | ||
190 | fn cast(syntax: SyntaxNode<R>) -> Option<Self> { | ||
191 | match syntax.kind() { | ||
192 | TYPE_ITEM => Some(TypeItem { syntax }), | ||
193 | _ => None, | ||
194 | } | ||
195 | } | ||
196 | fn syntax(&self) -> &SyntaxNode<R> { &self.syntax } | ||
197 | } | ||
198 | |||
199 | impl<R: TreeRoot> ast::NameOwner<R> for TypeItem<R> {} | ||
200 | impl<R: TreeRoot> TypeItem<R> {} | ||
201 | |||