diff options
author | Aleksey Kladov <[email protected]> | 2020-03-12 14:40:53 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-12 14:40:53 +0000 |
commit | afd64ef4f75844ff61bc5967406f40ec90047348 (patch) | |
tree | b3a58cfdd1f4ca8dd78902351ed8a45cf1f7922d /crates/ra_syntax/src/ast.rs | |
parent | 05b4fc6d79060fc3120f92b01119e3a851c37829 (diff) | |
parent | 31eec5e80c1a9a263482dfc9601f4cfc61e9e24b (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.rs | 2 |
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. |
33 | pub trait AstNode { | 33 | pub 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; |