]> git.lizzy.rs Git - rust.git/commitdiff
std: replace uses of old deriving attribute with new one
authorAndrew Paseltiner <apaseltiner@gmail.com>
Wed, 20 Mar 2013 15:36:16 +0000 (11:36 -0400)
committerAndrew Paseltiner <apaseltiner@gmail.com>
Fri, 22 Mar 2013 10:24:19 +0000 (06:24 -0400)
src/libstd/deque.rs
src/libstd/getopts.rs
src/libstd/list.rs
src/libstd/net_url.rs
src/libstd/semver.rs
src/libstd/test.rs
src/libstd/workcache.rs

index 18cf64b299f5853294729eebb1763238f871ed47..64d28dcde834c1cce093cbf034ac5a4913cdee35 100644 (file)
@@ -253,15 +253,15 @@ fn test_parameterized<T:Copy + Eq + Durable>(a: T, b: T, c: T, d: T) {
         fail_unless!(*deq.get(3) == d);
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     enum Taggy { One(int), Two(int, int), Three(int, int, int), }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     enum Taggypar<T> {
         Onepar(int), Twopar(int, int), Threepar(int, int, int),
     }
 
-    #[deriving_eq]
+    #[deriving(Eq)]
     struct RecCy {
         x: int,
         y: int,
index e2702b7d566c55fec503d570d3507e7c1059776c..de8a8f343816ca721976813992fdd53888663ba8 100644 (file)
 use core::str;
 use core::vec;
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Name {
     Long(~str),
     Short(char),
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum HasArg { Yes, No, Maybe, }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Occur { Req, Optional, Multi, }
 
 /// A description of a possible option
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct Opt {
     name: Name,
     hasarg: HasArg,
@@ -146,14 +146,14 @@ pub fn optmulti(name: &str) -> Opt {
     return Opt {name: mkname(name), hasarg: Yes, occur: Multi};
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 enum Optval { Val(~str), Given, }
 
 /**
  * The result of checking command line arguments. Contains a vector
  * of matches and a vector of free strings.
  */
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct Matches {
     opts: ~[Opt],
     vals: ~[~[Optval]],
@@ -179,7 +179,7 @@ fn find_opt(opts: &[Opt], nm: Name) -> Option<uint> {
  * The type returned when the command line does not conform to the
  * expected format. Pass this value to <fail_str> to get an error message.
  */
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Fail_ {
     ArgumentMissing(~str),
     UnrecognizedOption(~str),
@@ -446,7 +446,7 @@ pub fn opt_default(mm: &Matches, nm: &str, def: &str) -> Option<~str> {
                            _      => Some::<~str>(str::from_slice(def)) }
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum FailType {
     ArgumentMissing_,
     UnrecognizedOption_,
@@ -469,7 +469,7 @@ pub mod groups {
     /** one group of options, e.g., both -h and --help, along with
      * their shared description and properties
      */
-    #[deriving_eq]
+    #[deriving(Eq)]
     pub struct OptGroup {
         short_name: ~str,
         long_name: ~str,
index 3a0f299257e096d408890f7a318be6ea8e2bff06..eb1c249be695042f6eb158618c9578c9dc4d23b5 100644 (file)
@@ -15,7 +15,7 @@
 use core::prelude::*;
 use core::vec;
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum List<T> {
     Cons(T, @List<T>),
     Nil,
index 4943b374980a9d6f6e1ab88b85ead7cfd06c802a..6fb4f6747a3ee189517e3ccdbd2992aad70f5353 100644 (file)
@@ -25,7 +25,7 @@
 use core::to_str;
 use core::uint;
 
-#[deriving_eq]
+#[deriving(Eq)]
 struct Url {
     scheme: ~str,
     user: Option<UserInfo>,
@@ -36,7 +36,7 @@ struct Url {
     fragment: Option<~str>
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 struct UserInfo {
     user: ~str,
     pass: Option<~str>
@@ -398,7 +398,7 @@ pub fn decode_form_urlencoded(s: &[u8]) -> LinearMap<~str, ~[~str]> {
     return Err(~"url: Scheme must be terminated with a colon.");
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 enum Input {
     Digit, // all digits
     Hex, // digits and letters a-f
index e1e7f8ca92423817431a9300e2d7c116b918a466..3593ccc5ae89890c6b6926061bf577f19f1ad8ca 100644 (file)
@@ -19,7 +19,7 @@
 use core::to_str::ToStr;
 use core::uint;
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum Identifier {
     Numeric(uint),
     AlphaNumeric(~str)
@@ -60,7 +60,7 @@ impl ToStr for Identifier {
 }
 
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct Version {
     major: uint,
     minor: uint,
index fcc60c8d978195879857e34371d32656a2551168..1829e29826fd8da00c621bd33c5176f27c53141c 100644 (file)
@@ -188,13 +188,13 @@ pub fn parse_opts(args: &[~str]) -> OptRes {
     either::Left(test_opts)
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub struct BenchSamples {
     ns_iter_samples: ~[f64],
     mb_s: uint
 }
 
-#[deriving_eq]
+#[deriving(Eq)]
 pub enum TestResult { TrOk, TrFailed, TrIgnored, TrBench(BenchSamples) }
 
 struct ConsoleTestState {
index 68a6f8effaa7710d8de3c4884b2d0b4ca67efab2..f8b4337e437f2203e77e4f2a9ada2b7860c7d2c8 100644 (file)
@@ -96,7 +96,7 @@
 *
 */
 
-#[deriving_eq]
+#[deriving(Eq)]
 #[auto_encode]
 #[auto_decode]
 struct WorkKey {