@@ -72,7 +72,7 @@ pub struct LifetimeDef {
72
72
/// along with a bunch of supporting information.
73
73
///
74
74
/// E.g. `std::cmp::PartialEq`
75
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash ) ]
75
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
76
76
pub struct Path {
77
77
pub span : Span ,
78
78
/// The segments in the path: the things separated by `::`.
@@ -85,13 +85,6 @@ impl<'a> PartialEq<&'a str> for Path {
85
85
self . segments . len ( ) == 1 && self . segments [ 0 ] . identifier . name == * string
86
86
}
87
87
}
88
-
89
- impl fmt:: Debug for Path {
90
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
91
- write ! ( f, "path({})" , pprust:: path_to_string( self ) )
92
- }
93
- }
94
-
95
88
impl fmt:: Display for Path {
96
89
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
97
90
write ! ( f, "{}" , pprust:: path_to_string( self ) )
@@ -812,7 +805,7 @@ impl UnOp {
812
805
}
813
806
814
807
/// A statement
815
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash ) ]
808
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
816
809
pub struct Stmt {
817
810
pub id : NodeId ,
818
811
pub node : StmtKind ,
@@ -839,14 +832,7 @@ impl Stmt {
839
832
}
840
833
}
841
834
842
- impl fmt:: Debug for Stmt {
843
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
844
- write ! ( f, "stmt({}: {})" , self . id. to_string( ) , pprust:: stmt_to_string( self ) )
845
- }
846
- }
847
-
848
-
849
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash ) ]
835
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
850
836
pub enum StmtKind {
851
837
/// A local (let) binding.
852
838
Local ( P < Local > ) ,
@@ -929,7 +915,7 @@ pub enum UnsafeSource {
929
915
}
930
916
931
917
/// An expression
932
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , ) ]
918
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
933
919
pub struct Expr {
934
920
pub id : NodeId ,
935
921
pub node : ExprKind ,
@@ -1045,12 +1031,6 @@ impl Expr {
1045
1031
}
1046
1032
}
1047
1033
1048
- impl fmt:: Debug for Expr {
1049
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1050
- write ! ( f, "expr({}: {})" , self . id, pprust:: expr_to_string( self ) )
1051
- }
1052
- }
1053
-
1054
1034
/// Limit types of a range (inclusive or exclusive)
1055
1035
#[ derive( Copy , Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
1056
1036
pub enum RangeLimits {
0 commit comments