aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs19
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> {
180impl<R: TreeRoot> ast::NameOwner<R> for Trait<R> {} 180impl<R: TreeRoot> ast::NameOwner<R> for Trait<R> {}
181impl<R: TreeRoot> Trait<R> {} 181impl<R: TreeRoot> Trait<R> {}
182 182
183// TypeItem
184#[derive(Debug, Clone, Copy)]
185pub struct TypeItem<R: TreeRoot = Arc<SyntaxRoot>> {
186 syntax: SyntaxNode<R>,
187}
188
189impl<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
199impl<R: TreeRoot> ast::NameOwner<R> for TypeItem<R> {}
200impl<R: TreeRoot> TypeItem<R> {}
201