pub struct SourceFile {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for SourceFile {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for SourceFile {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct FnDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for FnDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for FnDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RetType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RetType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RetType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct StructDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for StructDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for StructDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct UnionDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for UnionDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for UnionDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordFieldDefList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordFieldDefList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordFieldDefList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordFieldDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordFieldDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordFieldDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TupleFieldDefList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TupleFieldDefList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TupleFieldDefList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TupleFieldDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TupleFieldDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TupleFieldDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct EnumDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for EnumDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for EnumDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct EnumVariantList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for EnumVariantList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for EnumVariantList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct EnumVariant {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for EnumVariant {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for EnumVariant {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TraitDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TraitDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TraitDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Module {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Module {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Module {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ItemList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ItemList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ItemList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ConstDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ConstDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ConstDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct StaticDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for StaticDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for StaticDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeAliasDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeAliasDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeAliasDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ImplDef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ImplDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ImplDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ParenType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ParenType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ParenType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TupleType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TupleType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TupleType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct NeverType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for NeverType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for NeverType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PathType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PathType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PathType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PointerType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PointerType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PointerType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ArrayType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ArrayType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ArrayType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct SliceType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for SliceType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for SliceType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ReferenceType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ReferenceType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ReferenceType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PlaceholderType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PlaceholderType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PlaceholderType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct FnPointerType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for FnPointerType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for FnPointerType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ForType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ForType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ForType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ImplTraitType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ImplTraitType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ImplTraitType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct DynTraitType {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for DynTraitType {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for DynTraitType {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TupleExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TupleExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TupleExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ArrayExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ArrayExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ArrayExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ParenExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ParenExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ParenExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PathExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PathExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PathExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LambdaExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LambdaExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LambdaExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct IfExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for IfExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for IfExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LoopExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LoopExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LoopExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TryBlockExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TryBlockExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TryBlockExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ForExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ForExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ForExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct WhileExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for WhileExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for WhileExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ContinueExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ContinueExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ContinueExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BreakExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BreakExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BreakExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Label {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Label {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Label {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BlockExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BlockExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BlockExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ReturnExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ReturnExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ReturnExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct CallExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for CallExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for CallExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MethodCallExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MethodCallExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MethodCallExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct IndexExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for IndexExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for IndexExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct FieldExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for FieldExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for FieldExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct AwaitExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for AwaitExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for AwaitExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TryExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TryExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TryExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct CastExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for CastExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for CastExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RefExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RefExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RefExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PrefixExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PrefixExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PrefixExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BoxExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BoxExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BoxExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RangeExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RangeExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RangeExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BinExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BinExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BinExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Literal {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Literal {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Literal {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MatchExpr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MatchExpr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MatchExpr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MatchArmList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MatchArmList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MatchArmList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MatchArm {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MatchArm {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MatchArm {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MatchGuard {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MatchGuard {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MatchGuard {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordLit {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordLit {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordLit {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordFieldList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordFieldList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordFieldList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordField {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordField {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordField {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct OrPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for OrPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for OrPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ParenPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ParenPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ParenPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RefPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RefPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RefPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BoxPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BoxPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BoxPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct BindPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for BindPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for BindPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PlaceholderPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PlaceholderPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PlaceholderPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct DotDotPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for DotDotPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for DotDotPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PathPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PathPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PathPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct SlicePat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for SlicePat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for SlicePat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RangePat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RangePat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RangePat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LiteralPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LiteralPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LiteralPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordFieldPatList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordFieldPatList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordFieldPatList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct RecordFieldPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for RecordFieldPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for RecordFieldPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TupleStructPat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TupleStructPat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TupleStructPat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TuplePat {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TuplePat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TuplePat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Visibility {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Visibility {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Visibility {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Name {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Name {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Name {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct NameRef {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for NameRef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for NameRef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MacroCall {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MacroCall {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MacroCall {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Attr {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Attr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Attr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TokenTree {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TokenTree {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TokenTree {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeParamList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeParamList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeParamList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeParam {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeParam {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeParam {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ConstParam {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ConstParam {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ConstParam {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LifetimeParam {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LifetimeParam {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LifetimeParam {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeBound {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeBound {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeBound {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeBoundList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeBoundList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeBoundList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct WherePred {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for WherePred {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for WherePred {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct WhereClause {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for WhereClause {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for WhereClause {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ExprStmt {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ExprStmt {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ExprStmt {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LetStmt {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LetStmt {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LetStmt {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Condition {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Condition {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Condition {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Block {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Block {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Block {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ParamList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ParamList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ParamList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct SelfParam {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for SelfParam {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for SelfParam {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Param {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Param {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Param {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct UseItem {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for UseItem {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for UseItem {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct UseTree {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for UseTree {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for UseTree {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Alias {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Alias {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Alias {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct UseTreeList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for UseTreeList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for UseTreeList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ExternCrateItem {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ExternCrateItem {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ExternCrateItem {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ArgList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ArgList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ArgList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct Path {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for Path {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Path {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct PathSegment {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for PathSegment {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for PathSegment {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeArgList {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeArgList {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeArgList {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct TypeArg {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for TypeArg {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeArg {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct AssocTypeArg {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for AssocTypeArg {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for AssocTypeArg {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct LifetimeArg {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for LifetimeArg {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for LifetimeArg {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct ConstArg {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for ConstArg {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ConstArg {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MacroItems {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MacroItems {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MacroItems {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
pub struct MacroStmts {
pub(crate) syntax: SyntaxNode,
}
+impl std::fmt::Display for MacroStmts {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for MacroStmts {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
NominalDef::UnionDef(node)
}
}
+impl std::fmt::Display for NominalDef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for NominalDef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
TypeRef::DynTraitType(node)
}
}
+impl std::fmt::Display for TypeRef {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for TypeRef {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
ModuleItem::Module(node)
}
}
+impl std::fmt::Display for ModuleItem {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ModuleItem {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
ImplItem::ConstDef(node)
}
}
+impl std::fmt::Display for ImplItem {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for ImplItem {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
Expr::BoxExpr(node)
}
}
+impl std::fmt::Display for Expr {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Expr {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
Pat::LiteralPat(node)
}
}
+impl std::fmt::Display for Pat {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Pat {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
AttrInput::TokenTree(node)
}
}
+impl std::fmt::Display for AttrInput {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for AttrInput {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {
Stmt::LetStmt(node)
}
}
+impl std::fmt::Display for Stmt {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ std::fmt::Display::fmt(self.syntax(), f)
+ }
+}
impl AstNode for Stmt {
fn can_cast(kind: SyntaxKind) -> bool {
match kind {