]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/abi.rs
std: Rename Show/String to Debug/Display
[rust.git] / src / libsyntax / abi.rs
index 70bad90aea1c0e0149637b3e5fe008730491bc4a..7447e0b229ed3b84ad509124cf0d738ea2f6f911 100644 (file)
@@ -15,7 +15,7 @@
 
 use std::fmt;
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq, Eq, Show)]
 pub enum Os {
     OsWindows,
     OsMacos,
@@ -26,7 +26,7 @@ pub enum Os {
     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().)
@@ -47,7 +47,7 @@ pub enum Abi {
 }
 
 #[allow(non_camel_case_types)]
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq, Show)]
 pub enum Architecture {
     X86,
     X86_64,
@@ -56,7 +56,7 @@ pub enum Architecture {
     Mipsel
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct AbiData {
     abi: Abi,
 
@@ -64,7 +64,7 @@ pub struct AbiData {
     name: &'static str,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AbiArchitecture {
     /// Not a real ABI (e.g., intrinsic)
     RustArch,
@@ -119,13 +119,13 @@ pub fn name(&self) -> &'static str {
     }
 }
 
-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),