aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorFireassember <[email protected]>2020-03-06 17:29:30 +0000
committerFireassember <[email protected]>2020-03-06 17:29:30 +0000
commit787043496aaa05be31162a8cdd0686a13da646cc (patch)
treeeb0861fefd1632e7e1b1c9f17fd4632c0037018b /crates/ra_syntax
parent190179489d7e19043c1cd087d4d4fc9035614227 (diff)
added fmt::Display as a supertrait for AstNode and changed generation.
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 4a70c712f..26fafb469 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -30,7 +30,7 @@ pub use self::{
30/// conversion itself has zero runtime cost: ast and syntax nodes have exactly 30/// conversion itself has zero runtime cost: ast and syntax nodes have exactly
31/// the same representation: a pointer to the tree root and a pointer to the 31/// the same representation: a pointer to the tree root and a pointer to the
32/// node itself. 32/// node itself.
33pub trait AstNode { 33pub trait AstNode: std::fmt::Display {
34 fn can_cast(kind: SyntaxKind) -> bool 34 fn can_cast(kind: SyntaxKind) -> bool
35 where 35 where
36 Self: Sized; 36 Self: Sized;