Skip to content

Commit afd64ef

Browse files
authored
Merge pull request #3562 from FireofGods/display_for_node
Add `std::fmt::Display` as a supertrait for `AstNode`
2 parents 05b4fc6 + 31eec5e commit afd64ef

File tree

3 files changed

+648
-1
lines changed

3 files changed

+648
-1
lines changed

crates/ra_syntax/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub use self::{
3030
/// conversion itself has zero runtime cost: ast and syntax nodes have exactly
3131
/// the same representation: a pointer to the tree root and a pointer to the
3232
/// node itself.
33-
pub trait AstNode {
33+
pub trait AstNode: std::fmt::Display {
3434
fn can_cast(kind: SyntaxKind) -> bool
3535
where
3636
Self: Sized;

0 commit comments

Comments
 (0)