diff options
Diffstat (limited to 'crates/libsyntax2/src/ast/mod.rs')
-rw-r--r-- | crates/libsyntax2/src/ast/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/libsyntax2/src/ast/mod.rs b/crates/libsyntax2/src/ast/mod.rs index 18a9f5d17..f001d340e 100644 --- a/crates/libsyntax2/src/ast/mod.rs +++ b/crates/libsyntax2/src/ast/mod.rs | |||
@@ -10,8 +10,9 @@ use { | |||
10 | }; | 10 | }; |
11 | pub use self::generated::*; | 11 | pub use self::generated::*; |
12 | 12 | ||
13 | pub trait AstNode<R: TreeRoot>: Sized { | 13 | pub trait AstNode<R: TreeRoot> { |
14 | fn cast(syntax: SyntaxNode<R>) -> Option<Self>; | 14 | fn cast(syntax: SyntaxNode<R>) -> Option<Self> |
15 | where Self: Sized; | ||
15 | fn syntax(&self) -> &SyntaxNode<R>; | 16 | fn syntax(&self) -> &SyntaxNode<R>; |
16 | } | 17 | } |
17 | 18 | ||