aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-03-12 14:40:53 +0000
committerGitHub <[email protected]>2020-03-12 14:40:53 +0000
commitafd64ef4f75844ff61bc5967406f40ec90047348 (patch)
treeb3a58cfdd1f4ca8dd78902351ed8a45cf1f7922d /crates/ra_syntax/src/ast.rs
parent05b4fc6d79060fc3120f92b01119e3a851c37829 (diff)
parent31eec5e80c1a9a263482dfc9601f4cfc61e9e24b (diff)
Merge pull request #3562 from FireofGods/display_for_node
Add `std::fmt::Display` as a supertrait for `AstNode`
Diffstat (limited to 'crates/ra_syntax/src/ast.rs')
-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;