fmt: derive Eq for all types

This commit is contained in:
Andrew Paseltiner 2013-01-07 17:05:13 -05:00
parent 0429493363
commit 73649f36e8

View File

@ -102,10 +102,13 @@ pub mod ct {
use str;
use vec;
#[deriving_eq]
pub enum Signedness { Signed, Unsigned, }
#[deriving_eq]
pub enum Caseness { CaseUpper, CaseLower, }
#[deriving_eq]
pub enum Ty {
TyBool,
TyStr,
@ -118,6 +121,7 @@ pub enum Ty {
TyPoly,
}
#[deriving_eq]
pub enum Flag {
FlagLeftJustify,
FlagLeftZeroPad,
@ -126,6 +130,7 @@ pub enum Flag {
FlagAlternate,
}
#[deriving_eq]
pub enum Count {
CountIs(uint),
CountIsParam(uint),
@ -133,6 +138,7 @@ pub enum Count {
CountImplied,
}
#[deriving_eq]
struct Parsed<T> {
val: T,
next: uint
@ -145,6 +151,7 @@ impl<T> Parsed<T> {
}
// A formatted conversion from an expression to a string
#[deriving_eq]
pub struct Conv {
param: Option<uint>,
flags: ~[Flag],
@ -154,6 +161,7 @@ pub struct Conv {
}
// A fragment of the output sequence
#[deriving_eq]
pub enum Piece { PieceString(~str), PieceConv(Conv), }
pub type ErrorFn = @fn(&str) -> !;