From 2b828c68e8acda628d6e3a36827d1ffd9c9aaec6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 14 Aug 2018 11:20:09 +0300 Subject: separete structure from symbols --- crates/libsyntax2/src/ast/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/libsyntax2/src/ast/mod.rs') 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 { }; pub use self::generated::*; -pub trait AstNode: Sized { - fn cast(syntax: SyntaxNode) -> Option; +pub trait AstNode { + fn cast(syntax: SyntaxNode) -> Option + where Self: Sized; fn syntax(&self) -> &SyntaxNode; } -- cgit v1.2.3