use std::fmt;
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq, Eq, Show)]
pub enum Os {
OsWindows,
OsMacos,
OsDragonfly,
}
-#[deriving(Copy, PartialEq, Eq, Hash, Encodable, Decodable, Clone)]
+#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Show)]
pub enum Abi {
// NB: This ordering MUST match the AbiDatas array below.
// (This is ensured by the test indices_are_correct().)
}
#[allow(non_camel_case_types)]
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq, Show)]
pub enum Architecture {
X86,
X86_64,
Mipsel
}
-#[deriving(Copy)]
+#[derive(Copy)]
pub struct AbiData {
abi: Abi,
name: &'static str,
}
-#[deriving(Copy)]
+#[derive(Copy)]
pub enum AbiArchitecture {
/// Not a real ABI (e.g., intrinsic)
RustArch,
}
}
-impl fmt::Show for Abi {
+impl fmt::Display for Abi {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "\"{}\"", self.name())
}
}
-impl fmt::Show for Os {
+impl fmt::Display for Os {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
OsLinux => "linux".fmt(f),