Skip to content

Commit 73649f3

Browse files
committed
fmt: derive Eq for all types
1 parent 0429493 commit 73649f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libcore/extfmt.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ pub mod ct {
102102
use str;
103103
use vec;
104104

105+
#[deriving_eq]
105106
pub enum Signedness { Signed, Unsigned, }
106107

108+
#[deriving_eq]
107109
pub enum Caseness { CaseUpper, CaseLower, }
108110

111+
#[deriving_eq]
109112
pub enum Ty {
110113
TyBool,
111114
TyStr,
@@ -118,6 +121,7 @@ pub mod ct {
118121
TyPoly,
119122
}
120123

124+
#[deriving_eq]
121125
pub enum Flag {
122126
FlagLeftJustify,
123127
FlagLeftZeroPad,
@@ -126,13 +130,15 @@ pub mod ct {
126130
FlagAlternate,
127131
}
128132

133+
#[deriving_eq]
129134
pub enum Count {
130135
CountIs(uint),
131136
CountIsParam(uint),
132137
CountIsNextParam,
133138
CountImplied,
134139
}
135140

141+
#[deriving_eq]
136142
struct Parsed<T> {
137143
val: T,
138144
next: uint
@@ -145,6 +151,7 @@ pub mod ct {
145151
}
146152

147153
// A formatted conversion from an expression to a string
154+
#[deriving_eq]
148155
pub struct Conv {
149156
param: Option<uint>,
150157
flags: ~[Flag],
@@ -154,6 +161,7 @@ pub mod ct {
154161
}
155162

156163
// A fragment of the output sequence
164+
#[deriving_eq]
157165
pub enum Piece { PieceString(~str), PieceConv(Conv), }
158166

159167
pub type ErrorFn = @fn(&str) -> !;

0 commit comments

Comments
 (0)