mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-09 20:06:28 +00:00
added fmt::Display as a supertrait for AstNode and changed generation.
This commit is contained in:
parent
190179489d
commit
787043496a
2 changed files with 7 additions and 1 deletions
|
@ -30,7 +30,7 @@ pub use self::{
|
|||
/// conversion itself has zero runtime cost: ast and syntax nodes have exactly
|
||||
/// the same representation: a pointer to the tree root and a pointer to the
|
||||
/// node itself.
|
||||
pub trait AstNode {
|
||||
pub trait AstNode: std::fmt::Display {
|
||||
fn can_cast(kind: SyntaxKind) -> bool
|
||||
where
|
||||
Self: Sized;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue