]> git.lizzy.rs Git - rust.git/commitdiff
librustc: Remove all uses of `static` from functions. rs=destatic
authorPatrick Walton <pcwalton@mimiga.net>
Fri, 22 Mar 2013 02:07:54 +0000 (19:07 -0700)
committerPatrick Walton <pcwalton@mimiga.net>
Fri, 22 Mar 2013 17:27:39 +0000 (10:27 -0700)
79 files changed:
src/libcore/bool.rs
src/libcore/dlist.rs
src/libcore/from_str.rs
src/libcore/hashmap.rs
src/libcore/iter.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/int-template/i16.rs
src/libcore/num/int-template/i32.rs
src/libcore/num/int-template/i64.rs
src/libcore/num/int-template/i8.rs
src/libcore/num/int-template/int.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/num/uint-template/u16.rs
src/libcore/num/uint-template/u32.rs
src/libcore/num/uint-template/u64.rs
src/libcore/num/uint-template/u8.rs
src/libcore/num/uint-template/uint.rs
src/libcore/path.rs
src/libcore/rand.rs
src/libcore/rt/context.rs
src/libcore/rt/sched.rs
src/libcore/rt/stack.rs
src/libcore/rt/thread.rs
src/libcore/rt/uv.rs
src/libcore/rt/uvio.rs
src/libcore/rt/work_queue.rs
src/libcore/trie.rs
src/libcore/unstable/extfmt.rs
src/librustc/middle/lang_items.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/trans/meth.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/infer/lattice.rs
src/librustc/middle/typeck/infer/unify.rs
src/libstd/bigint.rs
src/libstd/bitv.rs
src/libstd/deque.rs
src/libstd/flatpipes.rs
src/libstd/io_util.rs
src/libstd/net_url.rs
src/libstd/priority_queue.rs
src/libstd/serialize.rs
src/libstd/smallintmap.rs
src/libstd/task_pool.rs
src/libstd/time.rs
src/libstd/treemap.rs
src/libstd/workcache.rs
src/libsyntax/ast.rs
src/libsyntax/codemap.rs
src/libsyntax/ext/auto_encode.rs
src/libsyntax/ext/base.rs
src/libsyntax/util/interner.rs
src/test/auxiliary/anon_trait_static_method_lib.rs
src/test/auxiliary/static-methods-crate.rs
src/test/auxiliary/static_fn_inline_xc_aux.rs
src/test/auxiliary/static_fn_trait_xc_aux.rs
src/test/bench/sudoku.rs
src/test/compile-fail/issue-3707.rs
src/test/compile-fail/issue-3969.rs
src/test/compile-fail/issue-3973.rs
src/test/compile-fail/static-method-privacy.rs
src/test/compile-fail/staticness-mismatch.rs
src/test/run-pass/anon-trait-static-method.rs
src/test/run-pass/class-impl-very-parameterized-trait.rs
src/test/run-pass/conditional-compile.rs
src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs
src/test/run-pass/static-method-test.rs
src/test/run-pass/static-methods-in-traits.rs
src/test/run-pass/static-methods-in-traits2.rs
src/test/run-pass/trait-inheritance-num0.rs
src/test/run-pass/trait-inheritance-static.rs
src/test/run-pass/trait-inheritance-static2.rs
src/test/run-pass/trait-static-method-overwriting.rs
src/test/run-pass/typeclasses-eq-example-static.rs

index 512855d8f86c0a0fd9a9557a8d8c86f43071aeda..388542c99343b827f6be6cc1f9462cb4353f119c 100644 (file)
@@ -49,7 +49,7 @@
 
 /// Parse logic value from `s`
 impl FromStr for bool {
-    static pure fn from_str(s: &str) -> Option<bool> {
+    pure fn from_str(s: &str) -> Option<bool> {
         if s == "true" {
             Some(true)
         } else if s == "false" {
index 5a230da877f67d2d93c87cf06779effb3914cda2..ef3deb11a956445601520d5e6b7a76b2c68002bd 100644 (file)
@@ -126,7 +126,7 @@ pub fn concat<T>(lists: @mut DList<@mut DList<T>>) -> @mut DList<T> {
 }
 
 priv impl<T> DList<T> {
-    static pure fn new_link(data: T) -> DListLink<T> {
+    pure fn new_link(data: T) -> DListLink<T> {
         Some(@mut DListNode {
             data: data,
             linked: true,
index 166ba2252a9d41c9e59e64197cee16b94753af38..f3577d66cff482e2ee557c4e29015a29f7fc1b3a 100644 (file)
@@ -13,5 +13,5 @@
 use option::Option;
 
 pub trait FromStr {
-    static pure fn from_str(s: &str) -> Option<Self>;
+    pure fn from_str(s: &str) -> Option<Self>;
 }
index 68a55792077e9600f689b363224d47c7f3705e62..0ca7c4b540dffc809d43eb85d5448f592d3e7162 100644 (file)
@@ -373,7 +373,7 @@ fn remove(&mut self, k: &K) -> bool {
 
     pub impl<K:Hash + IterBytes + Eq,V> LinearMap<K, V> {
         /// Create an empty LinearMap
-        static fn new() -> LinearMap<K, V> {
+        fn new() -> LinearMap<K, V> {
             linear_map_with_capacity(INITIAL_CAPACITY)
         }
 
@@ -639,7 +639,7 @@ fn remove(&mut self, value: &T) -> bool { self.map.remove(value) }
 
     pub impl <T:Hash + IterBytes + Eq> LinearSet<T> {
         /// Create an empty LinearSet
-        static fn new() -> LinearSet<T> { LinearSet{map: LinearMap::new()} }
+        fn new() -> LinearSet<T> { LinearSet{map: LinearMap::new()} }
 
         /// Reserve space for at least `n` elements in the hash table.
         fn reserve_at_least(&mut self, n: uint) {
index 816dc6d22554f1f8a51970d95425cc5564c0c570..2042584add78d364f704eeba6b635ec4c098de9a 100644 (file)
@@ -89,8 +89,8 @@ pub trait Buildable<A> {
      *             as an argument a function that will push an element
      *             onto the sequence being constructed.
      */
-     static pure fn build_sized(size: uint,
-                                builder: &fn(push: &pure fn(A))) -> Self;
+     pure fn build_sized(size: uint,
+                         builder: &fn(push: &pure fn(A))) -> Self;
 }
 
 #[inline(always)]
index 54521abea9ec0da5d0fbd87d880edbd0943b60e2..d7f0b4be621f806cfe66c4e61253ad446464cf6b 100644 (file)
@@ -277,12 +277,12 @@ impl cmp::Ord for f32 {
 
 impl num::Zero for f32 {
     #[inline(always)]
-    static pure fn zero() -> f32 { 0.0 }
+    pure fn zero() -> f32 { 0.0 }
 }
 
 impl num::One for f32 {
     #[inline(always)]
-    static pure fn one() -> f32 { 1.0 }
+    pure fn one() -> f32 { 1.0 }
 }
 
 impl NumCast for f32 {
@@ -290,7 +290,7 @@ impl NumCast for f32 {
      * Cast `n` to an `f32`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> f32 { n.to_f32() }
+    pure fn from<N:NumCast>(n: N) -> f32 { n.to_f32() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
@@ -568,12 +568,12 @@ impl num::ToStrRadix for f32 {
 
 impl from_str::FromStr for f32 {
     #[inline(always)]
-    static pure fn from_str(val: &str) -> Option<f32> { from_str(val) }
+    pure fn from_str(val: &str) -> Option<f32> { from_str(val) }
 }
 
 impl num::FromStrRadix for f32 {
     #[inline(always)]
-    static pure fn from_str_radix(val: &str, rdx: uint) -> Option<f32> {
+    pure fn from_str_radix(val: &str, rdx: uint) -> Option<f32> {
         from_str_radix(val, rdx)
     }
 }
index a2cf629dc9f362dde7879883d37bdc44b75f52b1..7acb7ac462eaa2ea09cc244ab3143885e5bb8d74 100644 (file)
@@ -304,7 +304,7 @@ impl NumCast for f64 {
      * Cast `n` to an `f64`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> f64 { n.to_f64() }
+    pure fn from<N:NumCast>(n: N) -> f64 { n.to_f64() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
@@ -325,12 +325,12 @@ impl NumCast for f64 {
 
 impl num::Zero for f64 {
     #[inline(always)]
-    static pure fn zero() -> f64 { 0.0 }
+    pure fn zero() -> f64 { 0.0 }
 }
 
 impl num::One for f64 {
     #[inline(always)]
-    static pure fn one() -> f64 { 1.0 }
+    pure fn one() -> f64 { 1.0 }
 }
 
 #[cfg(notest)]
@@ -592,12 +592,12 @@ impl num::ToStrRadix for f64 {
 
 impl from_str::FromStr for f64 {
     #[inline(always)]
-    static pure fn from_str(val: &str) -> Option<f64> { from_str(val) }
+    pure fn from_str(val: &str) -> Option<f64> { from_str(val) }
 }
 
 impl num::FromStrRadix for f64 {
     #[inline(always)]
-    static pure fn from_str_radix(val: &str, rdx: uint) -> Option<f64> {
+    pure fn from_str_radix(val: &str, rdx: uint) -> Option<f64> {
         from_str_radix(val, rdx)
     }
 }
index 1cceddf51a1d3dd74897ea4635ba5b86a5dbe2f1..f1026ce6608afadd8d23dd7fc1606ec00977db5d 100644 (file)
@@ -304,12 +304,12 @@ impl num::ToStrRadix for float {
 
 impl from_str::FromStr for float {
     #[inline(always)]
-    static pure fn from_str(val: &str) -> Option<float> { from_str(val) }
+    pure fn from_str(val: &str) -> Option<float> { from_str(val) }
 }
 
 impl num::FromStrRadix for float {
     #[inline(always)]
-    static pure fn from_str_radix(val: &str, radix: uint) -> Option<float> {
+    pure fn from_str_radix(val: &str, radix: uint) -> Option<float> {
         from_str_radix(val, radix)
     }
 }
@@ -408,12 +408,12 @@ impl Ord for float {
 
 impl num::Zero for float {
     #[inline(always)]
-    static pure fn zero() -> float { 0.0 }
+    pure fn zero() -> float { 0.0 }
 }
 
 impl num::One for float {
     #[inline(always)]
-    static pure fn one() -> float { 1.0 }
+    pure fn one() -> float { 1.0 }
 }
 
 impl NumCast for float {
@@ -421,7 +421,7 @@ impl NumCast for float {
      * Cast `n` to a `float`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> float { n.to_float() }
+    pure fn from<N:NumCast>(n: N) -> float { n.to_float() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index cef8542823a674b5b7e44a7335de19938dd93fd4..599bd0f1c68bf8a87a2a77dba90f0994a085b162 100644 (file)
@@ -163,12 +163,12 @@ impl Eq for T {
 
 impl num::Zero for T {
     #[inline(always)]
-    static pure fn zero() -> T { 0 }
+    pure fn zero() -> T { 0 }
 }
 
 impl num::One for T {
     #[inline(always)]
-    static pure fn one() -> T { 1 }
+    pure fn one() -> T { 1 }
 }
 
 #[cfg(notest)]
@@ -221,14 +221,14 @@ impl ops::Neg<T> for T {
 
 impl FromStr for T {
     #[inline(always)]
-    static pure fn from_str(s: &str) -> Option<T> {
+    pure fn from_str(s: &str) -> Option<T> {
         from_str(s)
     }
 }
 
 impl FromStrRadix for T {
     #[inline(always)]
-    static pure fn from_str_radix(&self, s: &str, radix: uint) -> Option<T> {
+    pure fn from_str_radix(s: &str, radix: uint) -> Option<T> {
         from_str_radix(s, radix)
     }
 }
index 3c4ca532be764beb3edcb1cf62da5ded3032344f..04bd205f53d52ee2616740cad3bc4ff9f3fa62ea 100644 (file)
@@ -22,7 +22,7 @@ impl NumCast for i16 {
      * Cast `n` to a `i16`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> i16 { n.to_i16() }
+    pure fn from<N:NumCast>(n: N) -> i16 { n.to_i16() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index 30eb4437d570113611b08313371177649513d1a3..1cdd93c411ea50ed269bd3da8ca3187507d2e815 100644 (file)
@@ -22,7 +22,7 @@ impl NumCast for i32 {
      * Cast `n` to a `i32`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> i32 { n.to_i32() }
+    pure fn from<N:NumCast>(n: N) -> i32 { n.to_i32() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index 61736cf958743783abb182c58ccc439c629fd83a..2a7c155f8b52580d0005a5bca9b6c1b459b1a7d6 100644 (file)
@@ -22,7 +22,7 @@ impl NumCast for i64 {
      * Cast `n` to a `i64`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> i64 { n.to_i64() }
+    pure fn from<N:NumCast>(n: N) -> i64 { n.to_i64() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index e70811adff1c0162e494c50bfe1ae21a3a5f5de2..ac1dc76c26467a05dacbe5b72601f29e8e985b2c 100644 (file)
@@ -22,7 +22,7 @@ impl NumCast for i8 {
      * Cast `n` to a `i8`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> i8 { n.to_i8() }
+    pure fn from<N:NumCast>(n: N) -> i8 { n.to_i8() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index f007cc5b119fb873375c2a1ba3eff608ba70037d..0bd52491a630d23bec87aa56aa771951c0efe2cd 100644 (file)
@@ -63,7 +63,7 @@ impl NumCast for int {
      * Cast `n` to a `int`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> int { n.to_int() }
+    pure fn from<N:NumCast>(n: N) -> int { n.to_int() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index a462aed8be0d19004fb8af8d6b1489417d216815..fe829f6193b90a1985239005cf27f0fc13bbb537 100644 (file)
 
 pub trait IntConvertible {
     pure fn to_int(&self) -> int;
-    static pure fn from_int(n: int) -> Self;
+    pure fn from_int(n: int) -> Self;
 }
 
 pub trait Zero {
-    static pure fn zero() -> Self;
+    pure fn zero() -> Self;
 }
 
 pub trait One {
-    static pure fn one() -> Self;
+    pure fn one() -> Self;
 }
 
 pub pure fn abs<T:Ord + Zero + Neg<T>>(v: T) -> T {
@@ -67,7 +67,7 @@ pub enum RoundMode {
  * An interface for generic numeric type casts
  */
 pub trait NumCast {
-    static pure fn from<T:NumCast>(n: T) -> Self;
+    pure fn from<T:NumCast>(n: T) -> Self;
 
     pure fn to_u8(&self) -> u8;
     pure fn to_u16(&self) -> u16;
@@ -91,7 +91,7 @@ pub trait ToStrRadix {
 }
 
 pub trait FromStrRadix {
-    static pub pure fn from_str_radix(str: &str, radix: uint) -> Option<Self>;
+    pub pure fn from_str_radix(str: &str, radix: uint) -> Option<Self>;
 }
 
 // Generic math functions:
index 28e57a354c8beb9b98e8831c7ec6174044420f6c..0bf20f55b2fad33f7698b633e06f753f2b536b4e 100644 (file)
@@ -66,10 +66,10 @@ pub enum SignFormat {
 }
 
 pub trait NumStrConv {
-    static pure fn NaN()      -> Option<Self>;
-    static pure fn inf()      -> Option<Self>;
-    static pure fn neg_inf()  -> Option<Self>;
-    static pure fn neg_zero() -> Option<Self>;
+    pure fn NaN()      -> Option<Self>;
+    pure fn inf()      -> Option<Self>;
+    pure fn neg_inf()  -> Option<Self>;
+    pure fn neg_zero() -> Option<Self>;
 
     pure fn round_to_zero(&self)   -> Self;
     pure fn fractional_part(&self) -> Self;
@@ -78,13 +78,13 @@ pub trait NumStrConv {
 macro_rules! impl_NumStrConv_Floating (($t:ty) => (
     impl NumStrConv for $t {
         #[inline(always)]
-        static pure fn NaN()      -> Option<$t> { Some( 0.0 / 0.0) }
+        pure fn NaN()      -> Option<$t> { Some( 0.0 / 0.0) }
         #[inline(always)]
-        static pure fn inf()      -> Option<$t> { Some( 1.0 / 0.0) }
+        pure fn inf()      -> Option<$t> { Some( 1.0 / 0.0) }
         #[inline(always)]
-        static pure fn neg_inf()  -> Option<$t> { Some(-1.0 / 0.0) }
+        pure fn neg_inf()  -> Option<$t> { Some(-1.0 / 0.0) }
         #[inline(always)]
-        static pure fn neg_zero() -> Option<$t> { Some(-0.0      ) }
+        pure fn neg_zero() -> Option<$t> { Some(-0.0      ) }
 
         #[inline(always)]
         pure fn round_to_zero(&self) -> $t {
@@ -102,10 +102,10 @@ impl NumStrConv for $t {
 
 macro_rules! impl_NumStrConv_Integer (($t:ty) => (
     impl NumStrConv for $t {
-        #[inline(always)] static pure fn NaN()      -> Option<$t> { None }
-        #[inline(always)] static pure fn inf()      -> Option<$t> { None }
-        #[inline(always)] static pure fn neg_inf()  -> Option<$t> { None }
-        #[inline(always)] static pure fn neg_zero() -> Option<$t> { None }
+        #[inline(always)] pure fn NaN()      -> Option<$t> { None }
+        #[inline(always)] pure fn inf()      -> Option<$t> { None }
+        #[inline(always)] pure fn neg_inf()  -> Option<$t> { None }
+        #[inline(always)] pure fn neg_zero() -> Option<$t> { None }
 
         #[inline(always)] pure fn round_to_zero(&self)   -> $t { *self }
         #[inline(always)] pure fn fractional_part(&self) -> $t {     0 }
index 9abbfb03d7a567a8578f9291c296fd0e9343c6c6..1e56c37bab06dd8045fb59b36598843f096357af 100644 (file)
@@ -129,12 +129,12 @@ impl Eq for T {
 
 impl num::Zero for T {
     #[inline(always)]
-    static pure fn zero() -> T { 0 }
+    pure fn zero() -> T { 0 }
 }
 
 impl num::One for T {
     #[inline(always)]
-    static pure fn one() -> T { 1 }
+    pure fn one() -> T { 1 }
 }
 
 #[cfg(notest)]
@@ -187,14 +187,14 @@ impl ops::Neg<T> for T {
 
 impl FromStr for T {
     #[inline(always)]
-    static pure fn from_str(s: &str) -> Option<T> {
+    pure fn from_str(s: &str) -> Option<T> {
         from_str(s)
     }
 }
 
 impl FromStrRadix for T {
     #[inline(always)]
-    static pure fn from_str_radix(&self, s: &str, radix: uint) -> Option<T> {
+    pure fn from_str_radix(s: &str, radix: uint) -> Option<T> {
         from_str_radix(s, radix)
     }
 }
index 16a1d6209295a1407242885308889a4fc909a3e1..84406d5ed49d509b0d9346ebb5844f8cc28716af 100644 (file)
@@ -24,7 +24,7 @@ impl NumCast for u16 {
      * Cast `n` to a `u16`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> u16 { n.to_u16() }
+    pure fn from<N:NumCast>(n: N) -> u16 { n.to_u16() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self          }
index cf92feb6427f402c2525e96a523314a9499a7ebb..94d2c9b75f13c41bdb851adcc1532e9fc300050a 100644 (file)
@@ -24,7 +24,7 @@ impl NumCast for u32 {
      * Cast `n` to a `u32`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> u32 { n.to_u32() }
+    pure fn from<N:NumCast>(n: N) -> u32 { n.to_u32() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index 269d8e185f37bd4c936bb7e4da452cabc1ff860b..06d2efeeda7bc69f2d716f2769dd38c5b68df4f8 100644 (file)
@@ -24,7 +24,7 @@ impl NumCast for u64 {
      * Cast `n` to a `u64`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> u64 { n.to_u64() }
+    pure fn from<N:NumCast>(n: N) -> u64 { n.to_u64() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index 44428abdb4ff078a0fd20cee94c605374fa37903..31cb21473a80e918962461c2755d49af85d2da26 100644 (file)
@@ -31,7 +31,7 @@ impl NumCast for u8 {
      * Cast `n` to a `u8`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> u8 { n.to_u8() }
+    pure fn from<N:NumCast>(n: N) -> u8 { n.to_u8() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self          }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index f73ff4442ceee0ba16a18d6be12d1d76cece060f..3b17f4f5327481b222368e8862bf6a4216d59050 100644 (file)
@@ -215,7 +215,7 @@ impl NumCast for uint {
      * Cast `n` to a `uint`
      */
     #[inline(always)]
-    static pure fn from<N:NumCast>(n: N) -> uint { n.to_uint() }
+    pure fn from<N:NumCast>(n: N) -> uint { n.to_uint() }
 
     #[inline(always)] pure fn to_u8(&self)    -> u8    { *self as u8    }
     #[inline(always)] pure fn to_u16(&self)   -> u16   { *self as u16   }
index df4a3fdfb9e4a83ece928281f8518301d6a3de02..7189ecaaddadbd29aad356cbb27590c97eb7e927 100644 (file)
@@ -43,7 +43,7 @@ pub struct PosixPath {
 }
 
 pub trait GenericPath {
-    static pure fn from_str(&str) -> Self;
+    pure fn from_str(&str) -> Self;
 
     pure fn dirname(&self) -> ~str;
     pure fn filename(&self) -> Option<~str>;
@@ -380,7 +380,7 @@ impl ToStr for PosixPath {
 // PosixPath and WindowsPath, most of their methods are common.
 impl GenericPath for PosixPath {
 
-    static pure fn from_str(s: &str) -> PosixPath {
+    pure fn from_str(s: &str) -> PosixPath {
         let mut components = str::split_nonempty(s, |c| c == '/');
         let is_absolute = (s.len() != 0 && s[0] == '/' as u8);
         return PosixPath { is_absolute: is_absolute,
@@ -563,7 +563,7 @@ impl ToStr for WindowsPath {
 
 impl GenericPath for WindowsPath {
 
-    static pure fn from_str(s: &str) -> WindowsPath {
+    pure fn from_str(s: &str) -> WindowsPath {
         let host;
         let device;
         let rest;
index 4cb5e58b73331855e22e44002f2db3b03429ba01..6902cd4ef6971014334b6fcc68325ef905860e33 100644 (file)
 
 /// A type that can be randomly generated using an RNG
 pub trait Rand {
-    static fn rand(rng: @rand::Rng) -> Self;
+    fn rand(rng: @rand::Rng) -> Self;
 }
 
 impl Rand for int {
-    static fn rand(rng: @rand::Rng) -> int {
+    fn rand(rng: @rand::Rng) -> int {
         rng.gen_int()
     }
 }
 
 impl Rand for i8 {
-    static fn rand(rng: @rand::Rng) -> i8 {
+    fn rand(rng: @rand::Rng) -> i8 {
         rng.gen_i8()
     }
 }
 
 impl Rand for i16 {
-    static fn rand(rng: @rand::Rng) -> i16 {
+    fn rand(rng: @rand::Rng) -> i16 {
         rng.gen_i16()
     }
 }
 
 impl Rand for i32 {
-    static fn rand(rng: @rand::Rng) -> i32 {
+    fn rand(rng: @rand::Rng) -> i32 {
         rng.gen_i32()
     }
 }
 
 impl Rand for i64 {
-    static fn rand(rng: @rand::Rng) -> i64 {
+    fn rand(rng: @rand::Rng) -> i64 {
         rng.gen_i64()
     }
 }
 
 impl Rand for u8 {
-    static fn rand(rng: @rand::Rng) -> u8 {
+    fn rand(rng: @rand::Rng) -> u8 {
         rng.gen_u8()
     }
 }
 
 impl Rand for u16 {
-    static fn rand(rng: @rand::Rng) -> u16 {
+    fn rand(rng: @rand::Rng) -> u16 {
         rng.gen_u16()
     }
 }
 
 impl Rand for u32 {
-    static fn rand(rng: @rand::Rng) -> u32 {
+    fn rand(rng: @rand::Rng) -> u32 {
         rng.gen_u32()
     }
 }
 
 impl Rand for u64 {
-    static fn rand(rng: @rand::Rng) -> u64 {
+    fn rand(rng: @rand::Rng) -> u64 {
         rng.gen_u64()
     }
 }
 
 impl Rand for float {
-    static fn rand(rng: @rand::Rng) -> float {
+    fn rand(rng: @rand::Rng) -> float {
         rng.gen_float()
     }
 }
 
 impl Rand for f32 {
-    static fn rand(rng: @rand::Rng) -> f32 {
+    fn rand(rng: @rand::Rng) -> f32 {
         rng.gen_f32()
     }
 }
 
 impl Rand for f64 {
-    static fn rand(rng: @rand::Rng) -> f64 {
+    fn rand(rng: @rand::Rng) -> f64 {
         rng.gen_f64()
     }
 }
 
 impl Rand for char {
-    static fn rand(rng: @rand::Rng) -> char {
+    fn rand(rng: @rand::Rng) -> char {
         rng.gen_char()
     }
 }
 
 impl Rand for bool {
-    static fn rand(rng: @rand::Rng) -> bool {
+    fn rand(rng: @rand::Rng) -> bool {
         rng.gen_bool()
     }
 }
 
 impl<T:Rand> Rand for Option<T> {
-    static fn rand(rng: @rand::Rng) -> Option<T> {
+    fn rand(rng: @rand::Rng) -> Option<T> {
         if rng.gen_bool() {
             Some(Rand::rand(rng))
         } else {
index dfb7bdf04c3bd788aa8d5ac3154fa93b2eb70ae2..8da80f7a4e8ce6d3e452c938d95825ab77434c48 100644 (file)
 pub struct Context(~Registers);
 
 pub impl Context {
-    static fn empty() -> Context {
+    fn empty() -> Context {
         Context(new_regs())
     }
 
     /// Create a new context that will resume execution by running ~fn()
     /// # Safety Note
     /// The `start` closure must remain valid for the life of the Task
-    static fn new(start: &~fn(), stack: &mut StackSegment) -> Context {
+    fn new(start: &~fn(), stack: &mut StackSegment) -> Context {
 
         // The C-ABI function that is the task entry point
         extern fn task_start_wrapper(f: &~fn()) { (*f)() }
@@ -49,7 +49,7 @@ pub impl Context {
         return Context(regs);
     }
 
-    static fn swap(out_context: &mut Context, in_context: &Context) {
+    fn swap(out_context: &mut Context, in_context: &Context) {
         let out_regs: &mut Registers = match out_context {
             &Context(~ref mut r) => r
         };
index 60dbc8b82da1155ae3feb7b5c71f61d4689969d8..4a140458fd341911b85826330fec50319879a082 100644 (file)
@@ -50,11 +50,11 @@ pub struct Scheduler {
 // complaining
 type UnsafeTaskReceiver = sys::Closure;
 trait HackAroundBorrowCk {
-    static fn from_fn(&fn(&mut Scheduler, ~Task)) -> Self;
+    fn from_fn(&fn(&mut Scheduler, ~Task)) -> Self;
     fn to_fn(self) -> &fn(&mut Scheduler, ~Task);
 }
 impl HackAroundBorrowCk for UnsafeTaskReceiver {
-    static fn from_fn(f: &fn(&mut Scheduler, ~Task)) -> UnsafeTaskReceiver {
+    fn from_fn(f: &fn(&mut Scheduler, ~Task)) -> UnsafeTaskReceiver {
         unsafe { transmute(f) }
     }
     fn to_fn(self) -> &fn(&mut Scheduler, ~Task) {
@@ -70,7 +70,7 @@ enum CleanupJob {
 
 pub impl Scheduler {
 
-    static pub fn new(event_loop: ~EventLoopObject) -> Scheduler {
+    pub fn new(event_loop: ~EventLoopObject) -> Scheduler {
         Scheduler {
             event_loop: event_loop,
             task_queue: WorkQueue::new(),
@@ -114,7 +114,7 @@ fn install(~self, f: &fn(&mut Scheduler)) -> ~Scheduler {
         return tlsched.take_scheduler();
     }
 
-    static fn local(f: &fn(&mut Scheduler)) {
+    fn local(f: &fn(&mut Scheduler)) {
         let mut tlsched = ThreadLocalScheduler::new();
         f(tlsched.get_scheduler());
     }
@@ -296,7 +296,7 @@ pub struct Task {
 }
 
 impl Task {
-    static pub fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
+    pub fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
         // XXX: Putting main into a ~ so it's a thin pointer and can
         // be passed to the spawn function.  Another unfortunate
         // allocation
@@ -337,7 +337,7 @@ fn recycle(~self, stack_pool: &mut StackPool) {
 struct ThreadLocalScheduler(tls::Key);
 
 impl ThreadLocalScheduler {
-    static fn new() -> ThreadLocalScheduler {
+    fn new() -> ThreadLocalScheduler {
         unsafe {
             // NB: This assumes that the TLS key has been created prior.
             // Currently done in rust_start.
index b5e7d4f3aa2153843c123406a5a0a91b1ed97adc..9b164eb08fa7c8437420b70da892387ef323d46b 100644 (file)
@@ -15,7 +15,7 @@ pub struct StackSegment {
 }
 
 pub impl StackSegment {
-    static fn new(size: uint) -> StackSegment {
+    fn new(size: uint) -> StackSegment {
         // Crate a block of uninitialized values
         let mut stack = vec::with_capacity(size);
         unsafe {
@@ -37,7 +37,7 @@ fn end(&self) -> *uint {
 pub struct StackPool(());
 
 impl StackPool {
-    static pub fn new() -> StackPool { StackPool(()) }
+    pub fn new() -> StackPool { StackPool(()) }
 
     fn take_segment(&self, min_size: uint) -> StackSegment {
         StackSegment::new(min_size)
index 5dccf90096e029dc82b3357329d18a62fab22dfe..c45e4295ab144d5209d02c5a96cd3f8d844f02ad 100644 (file)
@@ -20,7 +20,7 @@ struct Thread {
 }
 
 impl Thread {
-    static pub fn start(main: ~fn()) -> Thread {
+    pub fn start(main: ~fn()) -> Thread {
         fn substart(main: &fn()) -> *raw_thread {
             unsafe { rust_raw_thread_start(&main) }
         }
index e57d0f51870efe3b6854f72e25168fb69f561984..251f2a4a12b1546aa2594de9f9cd48d4dd0a4883 100644 (file)
@@ -74,7 +74,7 @@ impl Callback for NullCallback { }
 
 /// A type that wraps a native handle
 trait NativeHandle<T> {
-    static pub fn from_native_handle(T) -> Self;
+    pub fn from_native_handle(T) -> Self;
     pub fn native_handle(&self) -> T;
 }
 
@@ -86,7 +86,7 @@ pub struct Loop {
 }
 
 pub impl Loop {
-    static fn new() -> Loop {
+    fn new() -> Loop {
         let handle = unsafe { uvll::loop_new() };
         fail_unless!(handle.is_not_null());
         NativeHandle::from_native_handle(handle)
@@ -102,7 +102,7 @@ fn close(&mut self) {
 }
 
 impl NativeHandle<*uvll::uv_loop_t> for Loop {
-    static fn from_native_handle(handle: *uvll::uv_loop_t) -> Loop {
+    fn from_native_handle(handle: *uvll::uv_loop_t) -> Loop {
         Loop { handle: handle }
     }
     fn native_handle(&self) -> *uvll::uv_loop_t {
@@ -132,7 +132,7 @@ fn event_loop(&self) -> Loop {
 impl Callback for IdleCallback { }
 
 pub impl IdleWatcher {
-    static fn new(loop_: &mut Loop) -> IdleWatcher {
+    fn new(loop_: &mut Loop) -> IdleWatcher {
         unsafe {
             let handle = uvll::idle_new();
             fail_unless!(handle.is_not_null());
@@ -177,7 +177,7 @@ fn close(self) {
 }
 
 impl NativeHandle<*uvll::uv_idle_t> for IdleWatcher {
-    static fn from_native_handle(handle: *uvll::uv_idle_t) -> IdleWatcher {
+    fn from_native_handle(handle: *uvll::uv_idle_t) -> IdleWatcher {
         IdleWatcher(handle)
     }
     fn native_handle(&self) -> *uvll::uv_idle_t {
@@ -307,7 +307,7 @@ fn close(self, cb: NullCallback) {
 }
 
 impl NativeHandle<*uvll::uv_stream_t> for StreamWatcher {
-    static fn from_native_handle(
+    fn from_native_handle(
         handle: *uvll::uv_stream_t) -> StreamWatcher {
         StreamWatcher(handle)
     }
@@ -328,7 +328,7 @@ fn event_loop(&self) -> Loop {
 impl Callback for ConnectionCallback { }
 
 pub impl TcpWatcher {
-    static fn new(loop_: &mut Loop) -> TcpWatcher {
+    fn new(loop_: &mut Loop) -> TcpWatcher {
         unsafe {
             let size = size_of::<uvll::uv_tcp_t>() as size_t;
             let handle = malloc(size) as *uvll::uv_tcp_t;
@@ -421,7 +421,7 @@ fn as_stream(&self) -> StreamWatcher {
 }
 
 impl NativeHandle<*uvll::uv_tcp_t> for TcpWatcher {
-    static fn from_native_handle(handle: *uvll::uv_tcp_t) -> TcpWatcher {
+    fn from_native_handle(handle: *uvll::uv_tcp_t) -> TcpWatcher {
         TcpWatcher(handle)
     }
     fn native_handle(&self) -> *uvll::uv_tcp_t {
@@ -441,7 +441,7 @@ impl Request for ConnectRequest { }
 
 impl ConnectRequest {
 
-    static fn new() -> ConnectRequest {
+    fn new() -> ConnectRequest {
         let connect_handle = unsafe {
             malloc(size_of::<uvll::uv_connect_t>() as size_t)
         };
@@ -465,7 +465,7 @@ fn delete(self) {
 }
 
 impl NativeHandle<*uvll::uv_connect_t> for ConnectRequest {
-    static fn from_native_handle(
+    fn from_native_handle(
         handle: *uvll:: uv_connect_t) -> ConnectRequest {
         ConnectRequest(handle)
     }
@@ -480,7 +480,7 @@ impl Request for WriteRequest { }
 
 impl WriteRequest {
 
-    static fn new() -> WriteRequest {
+    fn new() -> WriteRequest {
         let write_handle = unsafe {
             malloc(size_of::<uvll::uv_write_t>() as size_t)
         };
@@ -503,7 +503,7 @@ fn delete(self) {
 }
 
 impl NativeHandle<*uvll::uv_write_t> for WriteRequest {
-    static fn from_native_handle(handle: *uvll:: uv_write_t) -> WriteRequest {
+    fn from_native_handle(handle: *uvll:: uv_write_t) -> WriteRequest {
         WriteRequest(handle)
     }
     fn native_handle(&self) -> *uvll::uv_write_t {
index a971ed92b7ebc87c3346e4aa01b46433ee8f3adb..58a4a65ca90c4768a6dcf04c3b7c9e228d49e6e1 100644 (file)
@@ -29,14 +29,14 @@ pub struct UvEventLoop {
 }
 
 pub impl UvEventLoop {
-    static fn new() -> UvEventLoop {
+    fn new() -> UvEventLoop {
         UvEventLoop {
             uvio: UvIoFactory(Loop::new())
         }
     }
 
     /// A convenience constructor
-    static fn new_scheduler() -> Scheduler {
+    fn new_scheduler() -> Scheduler {
         Scheduler::new(~UvEventLoop::new())
     }
 }
@@ -221,7 +221,7 @@ fn listen(&mut self) -> Option<~StreamObject> {
 pub struct UvStream(StreamWatcher);
 
 impl UvStream {
-    static fn new(watcher: StreamWatcher) -> UvStream {
+    fn new(watcher: StreamWatcher) -> UvStream {
         UvStream(watcher)
     }
 
index 1be2eb26e62921097cc97771792b362fc6111690..dfa88b783c59f7647e2fda7d15f224fe094eb04b 100644 (file)
@@ -15,7 +15,7 @@ pub struct WorkQueue<T> {
 }
 
 pub impl<T> WorkQueue<T> {
-    static fn new() -> WorkQueue<T> {
+    fn new() -> WorkQueue<T> {
         WorkQueue {
             queue: ~[]
         }
index 3b9d3ad4b7313b2d54a3997361f553a8c14f6879..7afe7e0d3d4ecaf55ab8cb3067780844140e3a1e 100644 (file)
@@ -139,7 +139,7 @@ fn remove(&mut self, key: &uint) -> bool {
 pub impl<T> TrieMap<T> {
     /// Create an empty TrieMap
     #[inline(always)]
-    static pure fn new() -> TrieMap<T> {
+    pure fn new() -> TrieMap<T> {
         TrieMap{root: TrieNode::new(), length: 0}
     }
 
@@ -192,7 +192,7 @@ fn clear(&mut self) { self.map.clear() }
 impl TrieSet {
     /// Create an empty TrieSet
     #[inline(always)]
-    static pure fn new() -> TrieSet {
+    pure fn new() -> TrieSet {
         TrieSet{map: TrieMap::new()}
     }
 
@@ -220,7 +220,7 @@ struct TrieNode<T> {
 
 impl<T> TrieNode<T> {
     #[inline(always)]
-    static pure fn new() -> TrieNode<T> {
+    pure fn new() -> TrieNode<T> {
         // FIXME: #5244: [Nothing, ..SIZE] should be possible without Copy
         TrieNode{count: 0,
                  children: [Nothing, Nothing, Nothing, Nothing,
index 28f810c3a28710c8fa1c93128ab311ed634ad919..766dd1a37a05e2b8bc38921df2e2d87b122f929b 100644 (file)
@@ -140,7 +140,7 @@ struct Parsed<T> {
     }
 
     pub impl<T> Parsed<T> {
-        static pure fn new(&self, val: T, next: uint) -> Parsed<T> {
+        pure fn new(val: T, next: uint) -> Parsed<T> {
             Parsed {val: val, next: next}
         }
     }
index f88be89ad00807aff3a5d422040d26f4423b59e7..c319ca891052f434e5da215cf7b6b1e1172911db 100644 (file)
@@ -82,7 +82,7 @@ pub struct LanguageItems {
 }
 
 pub impl LanguageItems {
-    static pub fn new(&self) -> LanguageItems {
+    pub fn new() -> LanguageItems {
         LanguageItems {
             items: [ None, ..35 ]
         }
@@ -96,7 +96,7 @@ fn each_item(&self, f: &fn(def_id: def_id, i: uint) -> bool) {
         }
     }
 
-    static pub fn item_name(&self, index: uint) -> &'static str {
+    pub fn item_name(index: uint) -> &'static str {
         match index {
             0  => "const",
             1  => "copy",
index d85570444d825862ae113aa25e85f1533f3a0249..f380773ec116b32b4a70a8e201d7208a8502e795 100644 (file)
@@ -311,7 +311,7 @@ impl ToStr for MutabilityCategory {
 }
 
 pub impl MutabilityCategory {
-    static fn from_mutbl(&self, m: ast::mutability) -> MutabilityCategory {
+    fn from_mutbl(m: ast::mutability) -> MutabilityCategory {
         match m {
             m_imm => McImmutable,
             m_const => McReadOnly,
index 205acedb9e1c2ad3f923622a6e0d8a996fd7c485..ce6f6c8efa702ae61e0e904ece05dbdd016b3008 100644 (file)
@@ -282,7 +282,7 @@ pub fn trans_static_method_callee(bcx: block,
     // When we translate a static fn defined in a trait like:
     //
     //   trait<T1...Tn> Trait {
-    //       static fn foo<M1...Mn>(...) {...}
+    //       fn foo<M1...Mn>(...) {...}
     //   }
     //
     // this winds up being translated as something like:
index 065942b8fe63b35ac442c14c9b5abf8840f747ce..3d919b90b77233e1d44484ef5fc70479797667aa 100644 (file)
@@ -1720,7 +1720,7 @@ fn is_copy(&self, cx: ctxt) -> bool {
         !self.intersects(TypeContents::noncopyable(cx))
     }
 
-    static fn noncopyable(_cx: ctxt) -> TypeContents {
+    fn noncopyable(_cx: ctxt) -> TypeContents {
         TC_DTOR + TC_BORROWED_MUT + TC_ONCE_CLOSURE + TC_OWNED_CLOSURE +
             TC_EMPTY_ENUM
     }
@@ -1729,7 +1729,7 @@ fn is_durable(&self, cx: ctxt) -> bool {
         !self.intersects(TypeContents::nondurable(cx))
     }
 
-    static fn nondurable(_cx: ctxt) -> TypeContents {
+    fn nondurable(_cx: ctxt) -> TypeContents {
         TC_BORROWED_POINTER
     }
 
@@ -1737,7 +1737,7 @@ fn is_owned(&self, cx: ctxt) -> bool {
         !self.intersects(TypeContents::nonowned(cx))
     }
 
-    static fn nonowned(_cx: ctxt) -> TypeContents {
+    fn nonowned(_cx: ctxt) -> TypeContents {
         TC_MANAGED + TC_BORROWED_POINTER
     }
 
@@ -1749,7 +1749,7 @@ fn is_const(&self, cx: ctxt) -> bool {
         !self.intersects(TypeContents::nonconst(cx))
     }
 
-    static fn nonconst(_cx: ctxt) -> TypeContents {
+    fn nonconst(_cx: ctxt) -> TypeContents {
         TC_MUTABLE
     }
 
@@ -1757,7 +1757,7 @@ fn moves_by_default(&self, cx: ctxt) -> bool {
         self.intersects(TypeContents::nonimplicitly_copyable(cx))
     }
 
-    static fn nonimplicitly_copyable(cx: ctxt) -> TypeContents {
+    fn nonimplicitly_copyable(cx: ctxt) -> TypeContents {
         let base = TypeContents::noncopyable(cx) + TC_OWNED_POINTER;
         if cx.vecs_implicitly_copyable {base} else {base + TC_OWNED_VEC}
     }
@@ -1766,7 +1766,7 @@ fn is_safe_for_default_mode(&self, cx: ctxt) -> bool {
         !self.intersects(TypeContents::nondefault_mode(cx))
     }
 
-    static fn nondefault_mode(cx: ctxt) -> TypeContents {
+    fn nondefault_mode(cx: ctxt) -> TypeContents {
         let tc = TypeContents::nonimplicitly_copyable(cx);
         tc + TC_BIG + TC_OWNED_VEC // disregard cx.vecs_implicitly_copyable
     }
@@ -1776,7 +1776,7 @@ fn needs_drop(&self, cx: ctxt) -> bool {
         self.intersects(tc)
     }
 
-    static fn owned(&self, _cx: ctxt) -> TypeContents {
+    fn owned(_cx: ctxt) -> TypeContents {
         //! Any kind of owned contents.
         TC_OWNED_CLOSURE + TC_OWNED_POINTER + TC_OWNED_VEC
     }
index 1ce590647653e0ed929839c3e606d925232925cb..a83d6f1755ecca254fac682df37196731e9b380d 100644 (file)
 use std::list;
 
 pub trait LatticeValue {
-    static fn sub(&self, cf: &CombineFields, a: &Self, b: &Self) -> ures;
-    static fn lub(&self, cf: &CombineFields, a: &Self, b: &Self)
-                 -> cres<Self>;
-    static fn glb(&self, cf: &CombineFields, a: &Self, b: &Self)
-                 -> cres<Self>;
+    fn sub(cf: &CombineFields, a: &Self, b: &Self) -> ures;
+    fn lub(cf: &CombineFields, a: &Self, b: &Self) -> cres<Self>;
+    fn glb(cf: &CombineFields, a: &Self, b: &Self) -> cres<Self>;
 }
 
 pub type LatticeOp<T> = &'self fn(cf: &CombineFields, a: &T, b: &T) -> cres<T>;
 
 impl LatticeValue for ty::t {
-    static fn sub(&self, cf: &CombineFields, a: &ty::t, b: &ty::t) -> ures {
+    fn sub(cf: &CombineFields, a: &ty::t, b: &ty::t) -> ures {
         Sub(*cf).tys(*a, *b).to_ures()
     }
 
-    static fn lub(&self, cf: &CombineFields, a: &ty::t, b: &ty::t)
-                 -> cres<ty::t> {
+    fn lub(cf: &CombineFields, a: &ty::t, b: &ty::t) -> cres<ty::t> {
         Lub(*cf).tys(*a, *b)
     }
 
-    static fn glb(&self, cf: &CombineFields, a: &ty::t, b: &ty::t)
-                 -> cres<ty::t> {
+    fn glb(cf: &CombineFields, a: &ty::t, b: &ty::t) -> cres<ty::t> {
         Glb(*cf).tys(*a, *b)
     }
 }
index fe77b62de43763bd5a92ff2254819b7cacc3ed2f..7711794d91db514a0dd29fe05ea21a16005206d9 100644 (file)
@@ -35,8 +35,8 @@ pub struct Node<V, T> {
 }
 
 pub trait UnifyVid<T> {
-    static fn appropriate_vals_and_bindings(&self, infcx: &'v mut InferCtxt)
-        -> &'v mut ValsAndBindings<Self, T>;
+    fn appropriate_vals_and_bindings(infcx: &'v mut InferCtxt)
+                                  -> &'v mut ValsAndBindings<Self, T>;
 }
 
 pub impl InferCtxt {
@@ -144,7 +144,7 @@ fn unify<T:Copy + InferStr,V:Copy + Vid + ToStr + UnifyVid<T>>(
 // doesn't have a subtyping relationship we need to worry about.
 
 pub trait SimplyUnifiable {
-    static fn to_type_err(&self, expected_found<Self>) -> ty::type_err;
+    fn to_type_err(expected_found<Self>) -> ty::type_err;
 }
 
 pub fn mk_err<T:SimplyUnifiable>(+a_is_expected: bool,
@@ -235,36 +235,34 @@ fn simple_var_t<T:Copy + Eq + InferStr + SimplyUnifiable,
 // ______________________________________________________________________
 
 impl UnifyVid<Bounds<ty::t>> for ty::TyVid {
-    static fn appropriate_vals_and_bindings(&self, infcx: &'v mut InferCtxt)
+    fn appropriate_vals_and_bindings(infcx: &'v mut InferCtxt)
         -> &'v mut ValsAndBindings<ty::TyVid, Bounds<ty::t>> {
         return &mut infcx.ty_var_bindings;
     }
 }
 
 impl UnifyVid<Option<IntVarValue>> for ty::IntVid {
-    static fn appropriate_vals_and_bindings(&self, infcx: &'v mut InferCtxt)
+    fn appropriate_vals_and_bindings(infcx: &'v mut InferCtxt)
         -> &'v mut ValsAndBindings<ty::IntVid, Option<IntVarValue>> {
         return &mut infcx.int_var_bindings;
     }
 }
 
 impl SimplyUnifiable for IntVarValue {
-    static fn to_type_err(&self, err: expected_found<IntVarValue>)
-        -> ty::type_err {
+    fn to_type_err(err: expected_found<IntVarValue>) -> ty::type_err {
         return ty::terr_int_mismatch(err);
     }
 }
 
 impl UnifyVid<Option<ast::float_ty>> for ty::FloatVid {
-    static fn appropriate_vals_and_bindings(&self, infcx: &'v mut InferCtxt)
+    fn appropriate_vals_and_bindings(infcx: &'v mut InferCtxt)
         -> &'v mut ValsAndBindings<ty::FloatVid, Option<ast::float_ty>> {
         return &mut infcx.float_var_bindings;
     }
 }
 
 impl SimplyUnifiable for ast::float_ty {
-    static fn to_type_err(&self, err: expected_found<ast::float_ty>)
-        -> ty::type_err {
+    fn to_type_err(err: expected_found<ast::float_ty>) -> ty::type_err {
         return ty::terr_float_mismatch(err);
     }
 }
index 01153a4b78e90d88487969d271af964e63e83b25..daf5d492ccfc9be48acf44bfb4e5bab7ee099749 100644 (file)
@@ -94,7 +94,7 @@ impl ToStr for BigUint {
 }
 
 impl from_str::FromStr for BigUint {
-    static pure fn from_str(s: &str) -> Option<BigUint> {
+    pure fn from_str(s: &str) -> Option<BigUint> {
         BigUint::from_str_radix(s, 10)
     }
 }
@@ -116,11 +116,11 @@ impl Shr<uint, BigUint> for BigUint {
 }
 
 impl Zero for BigUint {
-    static pure fn zero() -> BigUint { BigUint::new(~[]) }
+    pure fn zero() -> BigUint { BigUint::new(~[]) }
 }
 
 impl One for BigUint {
-    static pub pure fn one() -> BigUint { BigUint::new(~[1]) }
+    pub pure fn one() -> BigUint { BigUint::new(~[1]) }
 }
 
 impl Add<BigUint, BigUint> for BigUint {
@@ -256,14 +256,14 @@ impl IntConvertible for BigUint {
         uint::min(self.to_uint(), int::max_value as uint) as int
     }
 
-    static pure fn from_int(n: int) -> BigUint {
+    pure fn from_int(n: int) -> BigUint {
         if (n < 0) { Zero::zero() } else { BigUint::from_uint(n as uint) }
     }
 }
 
 pub impl BigUint {
     /// Creates and initializes an BigUint.
-    static pub pure fn new(v: ~[BigDigit]) -> BigUint {
+    pub pure fn new(v: ~[BigDigit]) -> BigUint {
         // omit trailing zeros
         let new_len = v.rposition(|n| *n != 0).map_default(0, |p| *p + 1);
 
@@ -274,7 +274,7 @@ pub impl BigUint {
     }
 
     /// Creates and initializes an BigUint.
-    static pub pure fn from_uint(n: uint) -> BigUint {
+    pub pure fn from_uint(n: uint) -> BigUint {
         match BigDigit::from_uint(n) {
             (0,  0)  => Zero::zero(),
             (0,  n0) => BigUint::new(~[n0]),
@@ -283,18 +283,18 @@ pub impl BigUint {
     }
 
     /// Creates and initializes an BigUint.
-    static pub pure fn from_slice(slice: &[BigDigit]) -> BigUint {
+    pub pure fn from_slice(slice: &[BigDigit]) -> BigUint {
         return BigUint::new(vec::from_slice(slice));
     }
 
     /// Creates and initializes an BigUint.
-    static pub pure fn from_str_radix(s: &str, radix: uint)
+    pub pure fn from_str_radix(s: &str, radix: uint)
         -> Option<BigUint> {
         BigUint::parse_bytes(str::to_bytes(s), radix)
     }
 
     /// Creates and initializes an BigUint.
-    static pub pure fn parse_bytes(buf: &[u8], radix: uint)
+    pub pure fn parse_bytes(buf: &[u8], radix: uint)
         -> Option<BigUint> {
         let (base, unit_len) = get_radix_base(radix);
         let base_num: BigUint = BigUint::from_uint(base);
@@ -614,7 +614,7 @@ impl ToStr for BigInt {
 }
 
 impl from_str::FromStr for BigInt {
-    static pure fn from_str(s: &str) -> Option<BigInt> {
+    pure fn from_str(s: &str) -> Option<BigInt> {
         BigInt::from_str_radix(s, 10)
     }
 }
@@ -632,13 +632,13 @@ impl Shr<uint, BigInt> for BigInt {
 }
 
 impl Zero for BigInt {
-    static pub pure fn zero() -> BigInt {
+    pub pure fn zero() -> BigInt {
         BigInt::from_biguint(Zero, Zero::zero())
     }
 }
 
 impl One for BigInt {
-    static pub pure fn one() -> BigInt {
+    pub pure fn one() -> BigInt {
         BigInt::from_biguint(Plus, One::one())
     }
 }
@@ -721,7 +721,7 @@ impl IntConvertible for BigInt {
         }
     }
 
-    static pure fn from_int(n: int) -> BigInt {
+    pure fn from_int(n: int) -> BigInt {
         if n > 0 {
            return BigInt::from_biguint(Plus,  BigUint::from_uint(n as uint));
         }
@@ -736,12 +736,12 @@ impl IntConvertible for BigInt {
 
 pub impl BigInt {
     /// Creates and initializes an BigInt.
-    static pub pure fn new(sign: Sign, v: ~[BigDigit]) -> BigInt {
+    pub pure fn new(sign: Sign, v: ~[BigDigit]) -> BigInt {
         BigInt::from_biguint(sign, BigUint::new(v))
     }
 
     /// Creates and initializes an BigInt.
-    static pub pure fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
+    pub pure fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
         if sign == Zero || data.is_zero() {
             return BigInt { sign: Zero, data: Zero::zero() };
         }
@@ -749,24 +749,24 @@ pub impl BigInt {
     }
 
     /// Creates and initializes an BigInt.
-    static pub pure fn from_uint(n: uint) -> BigInt {
+    pub pure fn from_uint(n: uint) -> BigInt {
         if n == 0 { return Zero::zero(); }
         return BigInt::from_biguint(Plus, BigUint::from_uint(n));
     }
 
     /// Creates and initializes an BigInt.
-    static pub pure fn from_slice(sign: Sign, slice: &[BigDigit]) -> BigInt {
+    pub pure fn from_slice(sign: Sign, slice: &[BigDigit]) -> BigInt {
         BigInt::from_biguint(sign, BigUint::from_slice(slice))
     }
 
     /// Creates and initializes an BigInt.
-    static pub pure fn from_str_radix(s: &str, radix: uint)
+    pub pure fn from_str_radix(s: &str, radix: uint)
         -> Option<BigInt> {
         BigInt::parse_bytes(str::to_bytes(s), radix)
     }
 
     /// Creates and initializes an BigInt.
-    static pub pure fn parse_bytes(buf: &[u8], radix: uint)
+    pub pure fn parse_bytes(buf: &[u8], radix: uint)
         -> Option<BigInt> {
         if buf.is_empty() { return None; }
         let mut sign  = Plus;
index d4b4c7b097c1c4fa5c5c4cb2079cdf6bb99b1ffa..2dcebcb276cb9ed8ecd87b31e88a2a525acd1cf8 100644 (file)
@@ -27,7 +27,7 @@ fn small_mask(nbits: uint) -> uint {
 }
 
 pub impl SmallBitv {
-    static fn new(bits: uint) -> SmallBitv {
+    fn new(bits: uint) -> SmallBitv {
         SmallBitv {bits: bits}
     }
 
@@ -124,7 +124,7 @@ fn big_mask(nbits: uint, elem: uint) -> uint {
 }
 
 pub impl BigBitv {
-    static fn new(storage: ~[uint]) -> BigBitv {
+    fn new(storage: ~[uint]) -> BigBitv {
         BigBitv {storage: storage}
     }
 
@@ -256,7 +256,7 @@ fn do_op(&mut self, op: Op, other: &Bitv) -> bool {
 }
 
 pub impl Bitv {
-    static fn new(nbits: uint, init: bool) -> Bitv {
+    fn new(nbits: uint, init: bool) -> Bitv {
         let rep = if nbits <= uint::bits {
             Small(~SmallBitv::new(if init {!0} else {0}))
         }
@@ -592,12 +592,12 @@ pub struct BitvSet {
 
 pub impl BitvSet {
     /// Creates a new bit vector set with initially no contents
-    static fn new() -> BitvSet {
+    fn new() -> BitvSet {
         BitvSet{ size: 0, bitv: BigBitv::new(~[0]) }
     }
 
     /// Creates a new bit vector set from the given bit vector
-    static fn from_bitv(bitv: Bitv) -> BitvSet {
+    fn from_bitv(bitv: Bitv) -> BitvSet {
         let mut size = 0;
         for bitv.ones |_| {
             size += 1;
index 64d28dcde834c1cce093cbf034ac5a4913cdee35..d8906fbd90a176af9d71e3fcbc7d0096cbae080c 100644 (file)
@@ -43,7 +43,7 @@ fn clear(&mut self) {
 
 pub impl<T> Deque<T> {
     /// Create an empty Deque
-    static pure fn new() -> Deque<T> {
+    pure fn new() -> Deque<T> {
         Deque{nelts: 0, lo: 0, hi: 0,
               elts: vec::from_fn(initial_capacity, |_| None)}
     }
index 105e34761a8edec73f047248a7c047fac1717db1..9855e803ccbccdf18b9d6613ffa67713c05bcc51 100644 (file)
@@ -314,7 +314,7 @@ fn send(&self, val: T) {
 }
 
 pub impl<T,U:Unflattener<T>,P:BytePort> FlatPort<T, U, P> {
-    static fn new(u: U, p: P) -> FlatPort<T, U, P> {
+    fn new(u: U, p: P) -> FlatPort<T, U, P> {
         FlatPort {
             unflattener: u,
             byte_port: p
@@ -323,7 +323,7 @@ pub impl<T,U:Unflattener<T>,P:BytePort> FlatPort<T, U, P> {
 }
 
 pub impl<T,F:Flattener<T>,C:ByteChan> FlatChan<T, F, C> {
-    static fn new(f: F, c: C) -> FlatChan<T, F, C> {
+    fn new(f: F, c: C) -> FlatChan<T, F, C> {
         FlatChan {
             flattener: f,
             byte_chan: c
@@ -376,7 +376,7 @@ fn flatten(&self, val: T) -> ~[u8] {
     }
 
     pub impl<T:Copy + Owned> PodUnflattener<T> {
-        static fn new() -> PodUnflattener<T> {
+        fn new() -> PodUnflattener<T> {
             PodUnflattener {
                 bogus: ()
             }
@@ -384,7 +384,7 @@ pub impl<T:Copy + Owned> PodUnflattener<T> {
     }
 
     pub impl<T:Copy + Owned> PodFlattener<T> {
-        static fn new() -> PodFlattener<T> {
+        fn new() -> PodFlattener<T> {
             PodFlattener {
                 bogus: ()
             }
@@ -419,7 +419,7 @@ fn flatten(&self, val: T) -> ~[u8] {
     }
 
     pub impl<D:Decoder,T:Decodable<D>> DeserializingUnflattener<D, T> {
-        static fn new(deserialize_buffer: DeserializeBuffer<T>)
+        fn new(deserialize_buffer: DeserializeBuffer<T>)
                    -> DeserializingUnflattener<D, T> {
             DeserializingUnflattener {
                 deserialize_buffer: deserialize_buffer
@@ -428,7 +428,7 @@ pub impl<D:Decoder,T:Decodable<D>> DeserializingUnflattener<D, T> {
     }
 
     pub impl<S:Encoder,T:Encodable<S>> SerializingFlattener<S, T> {
-        static fn new(serialize_value: SerializeValue<T>)
+        fn new(serialize_value: SerializeValue<T>)
                    -> SerializingFlattener<S, T> {
             SerializingFlattener {
                 serialize_value: serialize_value
@@ -459,15 +459,15 @@ pub fn serialize_value<D: Encoder + FromWriter,
     }
 
     pub trait FromReader {
-        static fn from_reader(r: @Reader) -> Self;
+        fn from_reader(r: @Reader) -> Self;
     }
 
     pub trait FromWriter {
-        static fn from_writer(w: @Writer) -> Self;
+        fn from_writer(w: @Writer) -> Self;
     }
 
     impl FromReader for json::Decoder/&self {
-        static fn from_reader(r: @Reader) -> json::Decoder/&self {
+        fn from_reader(r: @Reader) -> json::Decoder/&self {
             match json::from_reader(r) {
                 Ok(json) => {
                     json::Decoder(json)
@@ -478,13 +478,13 @@ impl FromReader for json::Decoder/&self {
     }
 
     impl FromWriter for json::Encoder {
-        static fn from_writer(w: @Writer) -> json::Encoder {
+        fn from_writer(w: @Writer) -> json::Encoder {
             json::Encoder(w)
         }
     }
 
     impl FromReader for ebml::reader::Decoder {
-        static fn from_reader(r: @Reader) -> ebml::reader::Decoder {
+        fn from_reader(r: @Reader) -> ebml::reader::Decoder {
             let buf = @r.read_whole_stream();
             let doc = ebml::reader::Doc(buf);
             ebml::reader::Decoder(doc)
@@ -492,7 +492,7 @@ impl FromReader for ebml::reader::Decoder {
     }
 
     impl FromWriter for ebml::writer::Encoder {
-        static fn from_writer(w: @Writer) -> ebml::writer::Encoder {
+        fn from_writer(w: @Writer) -> ebml::writer::Encoder {
             ebml::writer::Encoder(w)
         }
     }
@@ -543,7 +543,7 @@ fn send(&self, val: ~[u8]) {
     }
 
     pub impl<R:Reader> ReaderBytePort<R> {
-        static fn new(r: R) -> ReaderBytePort<R> {
+        fn new(r: R) -> ReaderBytePort<R> {
             ReaderBytePort {
                 reader: r
             }
@@ -551,7 +551,7 @@ pub impl<R:Reader> ReaderBytePort<R> {
     }
 
     pub impl<W:Writer> WriterByteChan<W> {
-        static fn new(w: W) -> WriterByteChan<W> {
+        fn new(w: W) -> WriterByteChan<W> {
             WriterByteChan {
                 writer: w
             }
@@ -606,7 +606,7 @@ fn send(&self, val: ~[u8]) {
     }
 
     pub impl PipeBytePort {
-        static fn new(p: Port<~[u8]>) -> PipeBytePort {
+        fn new(p: Port<~[u8]>) -> PipeBytePort {
             PipeBytePort {
                 port: p,
                 buf: ~[]
@@ -615,7 +615,7 @@ pub impl PipeBytePort {
     }
 
     pub impl PipeByteChan {
-        static fn new(c: Chan<~[u8]>) -> PipeByteChan {
+        fn new(c: Chan<~[u8]>) -> PipeByteChan {
             PipeByteChan {
                 chan: c
             }
index 7d673feaf254cbcc85caf813505de17ddbd328d5..50d2eb6a7852189d02b683ff93042bf087b4e6c6 100644 (file)
@@ -17,7 +17,7 @@ pub struct BufReader {
 }
 
 pub impl BufReader {
-    static pub fn new(v: ~[u8]) -> BufReader {
+    pub fn new(v: ~[u8]) -> BufReader {
         BufReader {
             buf: v,
             pos: 0
index 6fb4f6747a3ee189517e3ccdbd2992aad70f5353..49dc6f90740aa59787b6bc56b7cca71a930ab5b5 100644 (file)
@@ -45,7 +45,7 @@ struct UserInfo {
 pub type Query = ~[(~str, ~str)];
 
 pub impl Url {
-    static pure fn new(
+    pure fn new(
         scheme: ~str,
         user: Option<UserInfo>,
         host: ~str,
@@ -67,7 +67,7 @@ pub impl Url {
 }
 
 pub impl UserInfo {
-    static pure fn new(user: ~str, pass: Option<~str>) -> UserInfo {
+    pure fn new(user: ~str, pass: Option<~str>) -> UserInfo {
         UserInfo { user: user, pass: pass }
     }
 }
@@ -666,7 +666,7 @@ enum State {
 }
 
 impl FromStr for Url {
-    static pure fn from_str(s: &str) -> Option<Url> {
+    pure fn from_str(s: &str) -> Option<Url> {
         match from_str(s) {
             Ok(url) => Some(url),
             Err(_) => None
index a5a291c5b18f52d3a85395ff22b42268863370a4..7dad2ebbd8bfe0eca15fc57c3b6b46f783ca2542 100644 (file)
@@ -118,10 +118,10 @@ fn replace(&mut self, mut item: T) -> T {
     }
 
     /// Create an empty PriorityQueue
-    static pure fn new() -> PriorityQueue<T> { PriorityQueue{data: ~[],} }
+    pure fn new() -> PriorityQueue<T> { PriorityQueue{data: ~[],} }
 
     /// Create a PriorityQueue from a vector (heapify)
-    static pure fn from_vec(xs: ~[T]) -> PriorityQueue<T> {
+    pure fn from_vec(xs: ~[T]) -> PriorityQueue<T> {
         let mut q = PriorityQueue{data: xs,};
         let mut n = q.len() / 2;
         while n > 0 {
index 2c927b5db16cfab55c50ea43d35326519ae4d0ff..d288c06d2935cfc9c295850755f56884f2ca3c54 100644 (file)
@@ -110,7 +110,7 @@ pub trait Encodable<S:Encoder> {
 }
 
 pub trait Decodable<D:Decoder> {
-    static fn decode(&self, d: &D) -> Self;
+    fn decode(d: &D) -> Self;
 }
 
 impl<S:Encoder> Encodable<S> for uint {
@@ -118,7 +118,7 @@ fn encode(&self, s: &S) { s.emit_uint(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for uint {
-    static fn decode(&self, d: &D) -> uint {
+    fn decode(d: &D) -> uint {
         d.read_uint()
     }
 }
@@ -128,7 +128,7 @@ fn encode(&self, s: &S) { s.emit_u8(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for u8 {
-    static fn decode(&self, d: &D) -> u8 {
+    fn decode(d: &D) -> u8 {
         d.read_u8()
     }
 }
@@ -138,7 +138,7 @@ fn encode(&self, s: &S) { s.emit_u16(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for u16 {
-    static fn decode(&self, d: &D) -> u16 {
+    fn decode(d: &D) -> u16 {
         d.read_u16()
     }
 }
@@ -148,7 +148,7 @@ fn encode(&self, s: &S) { s.emit_u32(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for u32 {
-    static fn decode(&self, d: &D) -> u32 {
+    fn decode(d: &D) -> u32 {
         d.read_u32()
     }
 }
@@ -158,7 +158,7 @@ fn encode(&self, s: &S) { s.emit_u64(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for u64 {
-    static fn decode(&self, d: &D) -> u64 {
+    fn decode(d: &D) -> u64 {
         d.read_u64()
     }
 }
@@ -168,7 +168,7 @@ fn encode(&self, s: &S) { s.emit_int(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for int {
-    static fn decode(&self, d: &D) -> int {
+    fn decode(d: &D) -> int {
         d.read_int()
     }
 }
@@ -178,7 +178,7 @@ fn encode(&self, s: &S) { s.emit_i8(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for i8 {
-    static fn decode(&self, d: &D) -> i8 {
+    fn decode(d: &D) -> i8 {
         d.read_i8()
     }
 }
@@ -188,7 +188,7 @@ fn encode(&self, s: &S) { s.emit_i16(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for i16 {
-    static fn decode(&self, d: &D) -> i16 {
+    fn decode(d: &D) -> i16 {
         d.read_i16()
     }
 }
@@ -198,7 +198,7 @@ fn encode(&self, s: &S) { s.emit_i32(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for i32 {
-    static fn decode(&self, d: &D) -> i32 {
+    fn decode(d: &D) -> i32 {
         d.read_i32()
     }
 }
@@ -208,7 +208,7 @@ fn encode(&self, s: &S) { s.emit_i64(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for i64 {
-    static fn decode(&self, d: &D) -> i64 {
+    fn decode(d: &D) -> i64 {
         d.read_i64()
     }
 }
@@ -222,7 +222,7 @@ fn encode(&self, s: &S) { s.emit_owned_str(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for ~str {
-    static fn decode(&self, d: &D) -> ~str {
+    fn decode(d: &D) -> ~str {
         d.read_owned_str()
     }
 }
@@ -232,7 +232,7 @@ fn encode(&self, s: &S) { s.emit_managed_str(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for @str {
-    static fn decode(&self, d: &D) -> @str {
+    fn decode(d: &D) -> @str {
         d.read_managed_str()
     }
 }
@@ -242,7 +242,7 @@ fn encode(&self, s: &S) { s.emit_float(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for float {
-    static fn decode(&self, d: &D) -> float {
+    fn decode(d: &D) -> float {
         d.read_float()
     }
 }
@@ -252,7 +252,7 @@ fn encode(&self, s: &S) { s.emit_f32(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for f32 {
-    static fn decode(&self, d: &D) -> f32 {
+    fn decode(d: &D) -> f32 {
         d.read_f32() }
 }
 
@@ -261,7 +261,7 @@ fn encode(&self, s: &S) { s.emit_f64(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for f64 {
-    static fn decode(&self, d: &D) -> f64 {
+    fn decode(d: &D) -> f64 {
         d.read_f64()
     }
 }
@@ -271,7 +271,7 @@ fn encode(&self, s: &S) { s.emit_bool(*self) }
 }
 
 impl<D:Decoder> Decodable<D> for bool {
-    static fn decode(&self, d: &D) -> bool {
+    fn decode(d: &D) -> bool {
         d.read_bool()
     }
 }
@@ -281,7 +281,7 @@ fn encode(&self, s: &S) { s.emit_nil() }
 }
 
 impl<D:Decoder> Decodable<D> for () {
-    static fn decode(&self, d: &D) -> () {
+    fn decode(d: &D) -> () {
         d.read_nil()
     }
 }
@@ -299,7 +299,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T:Decodable<D>> Decodable<D> for ~T {
-    static fn decode(&self, d: &D) -> ~T {
+    fn decode(d: &D) -> ~T {
         d.read_owned(|| ~Decodable::decode(d))
     }
 }
@@ -311,7 +311,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T:Decodable<D>> Decodable<D> for @T {
-    static fn decode(&self, d: &D) -> @T {
+    fn decode(d: &D) -> @T {
         d.read_managed(|| @Decodable::decode(d))
     }
 }
@@ -337,7 +337,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T:Decodable<D>> Decodable<D> for ~[T] {
-    static fn decode(&self, d: &D) -> ~[T] {
+    fn decode(d: &D) -> ~[T] {
         do d.read_owned_vec |len| {
             do vec::from_fn(len) |i| {
                 d.read_vec_elt(i, || Decodable::decode(d))
@@ -357,7 +357,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T:Decodable<D>> Decodable<D> for @[T] {
-    static fn decode(&self, d: &D) -> @[T] {
+    fn decode(d: &D) -> @[T] {
         do d.read_managed_vec |len| {
             do at_vec::from_fn(len) |i| {
                 d.read_vec_elt(i, || Decodable::decode(d))
@@ -382,7 +382,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T:Decodable<D>> Decodable<D> for Option<T> {
-    static fn decode(&self, d: &D) -> Option<T> {
+    fn decode(d: &D) -> Option<T> {
         do d.read_enum(~"option") {
             do d.read_enum_variant |i| {
                 match i {
@@ -410,7 +410,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder,T0:Decodable<D>,T1:Decodable<D>> Decodable<D> for (T0, T1) {
-    static fn decode(&self, d: &D) -> (T0, T1) {
+    fn decode(d: &D) -> (T0, T1) {
         do d.read_tup(2) {
             (
                 d.read_tup_elt(0, || Decodable::decode(d)),
@@ -445,7 +445,7 @@ impl<
     T1: Decodable<D>,
     T2: Decodable<D>
 > Decodable<D> for (T0, T1, T2) {
-    static fn decode(&self, d: &D) -> (T0, T1, T2) {
+    fn decode(d: &D) -> (T0, T1, T2) {
         do d.read_tup(3) {
             (
                 d.read_tup_elt(0, || Decodable::decode(d)),
@@ -484,7 +484,7 @@ impl<
     T2: Decodable<D>,
     T3: Decodable<D>
 > Decodable<D> for (T0, T1, T2, T3) {
-    static fn decode(&self, d: &D) -> (T0, T1, T2, T3) {
+    fn decode(d: &D) -> (T0, T1, T2, T3) {
         do d.read_tup(4) {
             (
                 d.read_tup_elt(0, || Decodable::decode(d)),
@@ -527,7 +527,7 @@ impl<
     T3: Decodable<D>,
     T4: Decodable<D>
 > Decodable<D> for (T0, T1, T2, T3, T4) {
-    static fn decode(&self, d: &D)
+    fn decode(d: &D)
       -> (T0, T1, T2, T3, T4) {
         do d.read_tup(5) {
             (
index dc2688a20e73d0dd4ba7b524fc70bc2457ff497b..6a6635bae906c8835e5e95dae1797f93f5a0875b 100644 (file)
@@ -135,7 +135,7 @@ fn remove(&mut self, key: &uint) -> bool {
 
 pub impl<V> SmallIntMap<V> {
     /// Create an empty SmallIntMap
-    static pure fn new() -> SmallIntMap<V> { SmallIntMap{v: ~[]} }
+    pure fn new() -> SmallIntMap<V> { SmallIntMap{v: ~[]} }
 
     pure fn get(&self, key: &uint) -> &'self V {
         self.find(key).expect("key not present")
index d8ca5559f423d6cdebd2869e06cd1b87954cc98c..16645f151ee8e399e07f891a7000e22c745884e6 100644 (file)
@@ -43,9 +43,10 @@ pub impl<T> TaskPool<T> {
     /// new scheduler with the given mode. The provided `init_fn_factory`
     /// returns a function which, given the index of the task, should return
     /// local data to be kept around in that task.
-    static fn new(n_tasks: uint,
-                  opt_sched_mode: Option<SchedMode>,
-                  init_fn_factory: ~fn() -> ~fn(uint) -> T) -> TaskPool<T> {
+    fn new(n_tasks: uint,
+           opt_sched_mode: Option<SchedMode>,
+           init_fn_factory: ~fn() -> ~fn(uint) -> T)
+        -> TaskPool<T> {
         fail_unless!(n_tasks >= 1);
 
         let channels = do vec::from_fn(n_tasks) |i| {
index c72b3675c4cb50160fde61278b9cb98b4225e576..faebe26856428a59737a37de078801a3f1d52c7f 100644 (file)
@@ -51,7 +51,7 @@ pub struct Timespec { sec: i64, nsec: i32 }
  * nsec: 800_000_000_i32 }`.
  */
 pub impl Timespec {
-    static pure fn new(sec: i64, nsec: i32) -> Timespec {
+    pure fn new(sec: i64, nsec: i32) -> Timespec {
         fail_unless!(nsec >= 0 && nsec < NSEC_PER_SEC);
         Timespec { sec: sec, nsec: nsec }
     }
index f4d58568ae7d626d10746cfbd8cd594045377598..045d51c156768d2993eec597337c043d10f3cad8 100644 (file)
@@ -176,7 +176,7 @@ fn remove(&mut self, key: &K) -> bool {
 
 pub impl<K: TotalOrd, V> TreeMap<K, V> {
     /// Create an empty TreeMap
-    static pure fn new() -> TreeMap<K, V> { TreeMap{root: None, length: 0} }
+    pure fn new() -> TreeMap<K, V> { TreeMap{root: None, length: 0} }
 
     /// Visit all keys in reverse order
     pure fn each_key_reverse(&self, f: &fn(&K) -> bool) {
@@ -501,7 +501,7 @@ fn remove(&mut self, value: &T) -> bool { self.map.remove(value) }
 pub impl <T: TotalOrd> TreeSet<T> {
     /// Create an empty TreeSet
     #[inline(always)]
-    static pure fn new() -> TreeSet<T> { TreeSet{map: TreeMap::new()} }
+    pure fn new() -> TreeSet<T> { TreeSet{map: TreeMap::new()} }
 
     /// Get a lazy iterator over the values in the set.
     /// Requires that it be frozen (immutable).
@@ -542,7 +542,7 @@ struct TreeNode<K, V> {
 
 pub impl<K: TotalOrd, V> TreeNode<K, V> {
     #[inline(always)]
-    static pure fn new(key: K, value: V) -> TreeNode<K, V> {
+    pure fn new(key: K, value: V) -> TreeNode<K, V> {
         TreeNode{key: key, value: value, left: None, right: None, level: 1}
     }
 }
index f8b4337e437f2203e77e4f2a9ada2b7860c7d2c8..46335d062b40fe5a9af7a0cc7088f7d26d9d38f5 100644 (file)
@@ -132,7 +132,7 @@ impl cmp::Ord for WorkKey {
 }
 
 pub impl WorkKey {
-    static fn new(kind: &str, name: &str) -> WorkKey {
+    fn new(kind: &str, name: &str) -> WorkKey {
     WorkKey { kind: kind.to_owned(), name: name.to_owned() }
     }
 }
@@ -151,7 +151,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder> Decodable<D> for WorkMap {
-    static fn decode(&self, d: &D) -> WorkMap {
+    fn decode(d: &D) -> WorkMap {
         let v : ~[(WorkKey,~str)] = Decodable::decode(d);
         let mut w = LinearMap::new();
         for v.each |&(k, v)| {
@@ -258,7 +258,7 @@ fn digest_file(path: &Path) -> ~str {
 
 pub impl Context {
 
-    static fn new(db: @Mut<Database>,
+    fn new(db: @Mut<Database>,
                   lg: @Mut<Logger>,
                   cfg: @json::Object) -> Context {
         Context{db: db, logger: lg, cfg: cfg, freshness: LinearMap::new()}
@@ -367,7 +367,7 @@ fn exec<T:Owned +
 pub impl<T:Owned +
          Encodable<json::Encoder> +
          Decodable<json::Decoder/&static>> Work<T> { // FIXME(#5121)
-    static fn new(p: @Mut<Prep>, e: Either<T,PortOne<(Exec,T)>>) -> Work<T> {
+    fn new(p: @Mut<Prep>, e: Either<T,PortOne<(Exec,T)>>) -> Work<T> {
         Work { prep: p, res: Some(e) }
     }
 }
index cbdcef3eff65a558cbbbb118a0f1e795a4850295..edf731557319c5d7dbee0862c4e55871a404aa6c 100644 (file)
@@ -75,7 +75,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder> Decodable<D> for ident {
-    static fn decode(d: &D) -> ident {
+    fn decode(d: &D) -> ident {
         let intr = match unsafe {
             task::local_data::local_data_get(interner_key!())
         } {
index c84e3abf50bc92b4d0c8d47c693b49b619b29119..06d915cfed87f13f6268ac347fc15842df1f9093 100644 (file)
@@ -30,7 +30,7 @@
 use std::serialize::{Encodable, Decodable, Encoder, Decoder};
 
 pub trait Pos {
-    static pure fn from_uint(n: uint) -> Self;
+    pure fn from_uint(n: uint) -> Self;
     pure fn to_uint(&self) -> uint;
 }
 
@@ -45,7 +45,7 @@ pub trait Pos {
 // have been unsuccessful
 
 impl Pos for BytePos {
-    static pure fn from_uint(n: uint) -> BytePos { BytePos(n) }
+    pure fn from_uint(n: uint) -> BytePos { BytePos(n) }
     pure fn to_uint(&self) -> uint { **self }
 }
 
@@ -80,7 +80,7 @@ impl to_bytes::IterBytes for BytePos {
 }
 
 impl Pos for CharPos {
-    static pure fn from_uint(n: uint) -> CharPos { CharPos(n) }
+    pure fn from_uint(n: uint) -> CharPos { CharPos(n) }
     pure fn to_uint(&self) -> uint { **self }
 }
 
@@ -144,7 +144,7 @@ fn encode(&self, _s: &S) { _s.emit_nil() }
 }
 
 impl<D:Decoder> Decodable<D> for span {
-    static fn decode(_d: &D) -> span {
+    fn decode(_d: &D) -> span {
         dummy_sp()
     }
 }
@@ -286,7 +286,7 @@ pub struct CodeMap {
 }
 
 pub impl CodeMap {
-    static pub fn new() -> CodeMap {
+    pub fn new() -> CodeMap {
         CodeMap {
             files: @mut ~[],
         }
index e5f818eef5c234294c44b3bb979bf5e711be57f2..54ca5dc0d72f78ae152eaafc7cbaa44191933f7d 100644 (file)
@@ -32,7 +32,7 @@ fn encode(&self, s: &S) {
 }
 
 impl<D:Decoder> Decodable for node_id {
-    static fn decode(d: &D) -> Node {
+    fn decode(d: &D) -> Node {
         do d.read_struct("Node", 1) {
             Node {
                 id: d.read_field(~"x", 0, || decode(d))
@@ -66,7 +66,7 @@ impl<
         D: Decoder,
         T: Decodable<D>
     > spanned<T>: Decodable<D> {
-        static fn decode(d: &D) -> spanned<T> {
+        fn decode(d: &D) -> spanned<T> {
             do d.read_rec {
                 {
                     node: d.read_field(~"node", 0, || decode(d)),
index 50f89d37fae8e0576822e2d373a749e4e5ba4bae..4e3b4f2739ee93dc694f967694a30f503c7d5475 100644 (file)
@@ -439,7 +439,7 @@ pub enum MapChain<K,V> {
 impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
 
     // Constructor. I don't think we need a zero-arg one.
-    static fn new(+init: ~LinearMap<K,@V>) -> @mut MapChain<K,V> {
+    fn new(+init: ~LinearMap<K,@V>) -> @mut MapChain<K,V> {
         @mut BaseMapChain(init)
     }
 
index b4a85ce1617a14f097995d249df91111716ccc38..d0850d2bd2a858f74a954ad41e40adb4c59260af 100644 (file)
@@ -22,14 +22,14 @@ pub struct Interner<T> {
 
 // when traits can extend traits, we should extend index<uint,T> to get []
 pub impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> {
-    static fn new() -> Interner<T> {
+    fn new() -> Interner<T> {
         Interner {
             map: @mut LinearMap::new(),
             vect: @mut ~[],
         }
     }
 
-    static fn prefill(init: &[T]) -> Interner<T> {
+    fn prefill(init: &[T]) -> Interner<T> {
         let rv = Interner::new();
         for init.each() |v| { rv.intern(*v); }
         rv
index 1162131960a9c5bffaa15c9e951de9c4eecd1d16..9a778b18874141276b6c28dd2f6231f90a16b772 100644 (file)
@@ -13,7 +13,7 @@ pub struct Foo {
 }
 
 pub impl Foo {
-    static fn new() -> Foo {
+    fn new() -> Foo {
         Foo { x: 3 }
     }
 }
index dbfff4e8acaaf7b764b975429d151ce7754e0a61..74c46a8b8c6b472f9380f0fa72841298c02c0b01 100644 (file)
 #[crate_type = "lib"];
 
 pub trait read {
-    static fn readMaybe(s: ~str) -> Option<Self>;
+    fn readMaybe(s: ~str) -> Option<Self>;
 }
 
 impl read for int {
-    static fn readMaybe(s: ~str) -> Option<int> {
+    fn readMaybe(s: ~str) -> Option<int> {
         int::from_str(s)
     }
 }
 
 impl read for bool {
-    static fn readMaybe(s: ~str) -> Option<bool> {
+    fn readMaybe(s: ~str) -> Option<bool> {
         match s {
           ~"true" => Some(true),
           ~"false" => Some(false),
index f595529b7f6d79cceafc60707be818bdc9f9d9a6..b1bdfcfcffcb892f495586561a249d8bf59c0dd1 100644 (file)
 
 pub mod num {
     pub trait Num2 {
-        static pure fn from_int2(n: int) -> Self;
+        static fn from_int2(n: int) -> Self;
     }
 }
 
 pub mod float {
     impl ::num::Num2 for float {
         #[inline]
-        static pure fn from_int2(n: int) -> float { return n as float;  }
+        static fn from_int2(n: int) -> float { return n as float;  }
     }
 }
 
index 80734b8336b872aafdb90d2309571bdbda2fdc14..f3cb9a22625afc790a4f68dc9f04d8c7098a03da 100644 (file)
@@ -1,11 +1,11 @@
 pub mod num {
     pub trait Num2 {
-        static pure fn from_int2(n: int) -> Self;
+        pure fn from_int2(n: int) -> Self;
     }
 }
 
 pub mod float {
     impl ::num::Num2 for float {
-        static pure fn from_int2(n: int) -> float { return n as float;  }
+        pure fn from_int2(n: int) -> float { return n as float;  }
     }
 }
index ae92be6a4dec7d3f095a8eda5b8f01c2722f7caf..1e32697eb1073232af6f64ed844736a67dd3831c 100644 (file)
@@ -40,11 +40,11 @@ struct Sudoku {
 }
 
 pub impl Sudoku {
-    static pub fn new(g: grid) -> Sudoku {
+    pub fn new(g: grid) -> Sudoku {
         return Sudoku { grid: g }
     }
 
-    static pub fn from_vec(vec: &[[u8 * 9] * 9]) -> Sudoku {
+    pub fn from_vec(vec: &[[u8 * 9] * 9]) -> Sudoku {
         let mut g = do vec::from_fn(9u) |i| {
             do vec::from_fn(9u) |j| { vec[i][j] }
         };
@@ -62,7 +62,7 @@ pub fn equal(&self, other: &Sudoku) -> bool {
         return true;
     }
 
-    static pub fn read(reader: @io::Reader) -> Sudoku {
+    pub fn read(reader: @io::Reader) -> Sudoku {
         fail_unless!(reader.read_line() == ~"9,9"); /* assert first line is exactly "9,9" */
 
         let mut g = vec::from_fn(10u, { |_i| ~[0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8] });
@@ -156,7 +156,7 @@ fn drop_colors(&mut self, avail: &mut Colors, row: u8, col: u8) {
 const heads: u16 = (1u16 << 10) - 1; /* bits 9..0 */
 
 impl Colors {
-    static fn new(start_color: u8) -> Colors {
+    fn new(start_color: u8) -> Colors {
         // Sets bits 9..start_color
         let tails = !0u16 << start_color;
         return Colors(heads & tails);
index 040bd46ab8c8dd7779308bfdebb6906115b78399..ad5fa16f98cb876ba977eb13ab2f41c96b2cb8cb 100644 (file)
@@ -14,7 +14,7 @@ struct Obj {
 }
 
 pub impl Obj {
-    static pure fn boom() -> bool {
+    pure fn boom() -> bool {
         return 1+1 == 2
     }
     pure fn chirp() {
index e2bf708feabc7fb1e108dc0e2d63c796453cfd35..9464f05158e96b55817f3f9d41e2fc0b343b5430 100644 (file)
@@ -17,7 +17,7 @@ trait BikeMethods {
 }
 
 impl BikeMethods for Bike {
-    static fn woops(&const self) -> ~str { ~"foo" }
+    fn woops(&const self) -> ~str { ~"foo" }
     //~^ ERROR method `woops` is declared as static in its impl, but not in its trait
 }
 
index 19244d24bcc71e565f4838ff7b88044f362d90bc..15107ccd51ce389d4356dfa65e461e0eb7850d27 100644 (file)
@@ -16,7 +16,7 @@ struct Point {
 }
 
 impl ToStr for Point { //~ ERROR implements a method not defined in the trait
-    static fn new(x: float, y: float) -> Point {
+    fn new(x: float, y: float) -> Point {
         Point { x: x, y: y }
     }
 
index d9b4112b1bd86ea87ab4a3eaf5db661e8fd0bbaf..50df4f04971c81835dcc38195edb30d3bc62f930 100644 (file)
@@ -1,7 +1,7 @@
 mod a {
     pub struct S;
     impl S {
-        static fn new() -> S { S }
+        fn new() -> S { S }
     }
 }
 
index 531d722d8bc3c0dc2554cb0ffc8328f10d8a6d10..719da233335e1db3190fb223c9eba744aa44f5ae 100644 (file)
@@ -10,7 +10,7 @@
 
 
 trait foo {
-    static fn bar();
+    fn bar();
 }
 
 impl foo for int {
index 2ec0b59e13feebcd6fc2772eccba13498c7a6802..8e11786786ff995043dab24103f1972e31fe3693 100644 (file)
@@ -13,7 +13,7 @@ struct Foo {
 }
 
 pub impl Foo {
-    static fn new() -> Foo {
+    fn new() -> Foo {
         Foo { x: 3 }
     }
 }
index a0a4ea19964f7d7eab5adb17f818074cead14e3d..a82db7b1be3729325cf57de372374c715d77de5d 100644 (file)
@@ -115,7 +115,7 @@ pub impl<T> cat<T> {
         }
     }
 
-    static pure fn new(in_x: int, in_y: int, in_name: T) -> cat<T> {
+    pure fn new(in_x: int, in_y: int, in_name: T) -> cat<T> {
         cat{meows: in_x, how_hungry: in_y, name: in_name }
     }
 }
index 223825f60a7493adae68e5fb686dded4f6477f14..38854abff47f104d93339a2cc24780a17935bd2f 100644 (file)
@@ -130,9 +130,9 @@ struct Foo {
 
     impl Fooable for Foo {
         #[cfg(bogus)]
-        static fn what(&self) { }
+        fn what(&self) { }
 
-        static fn what(&self) { }
+        fn what(&self) { }
 
         #[cfg(bogus)]
         fn the(&self) { }
@@ -142,9 +142,9 @@ fn the(&self) { }
 
     trait Fooable {
         #[cfg(bogus)]
-        static fn what(&self);
+        fn what(&self);
 
-        static fn what(&self);
+        fn what(&self);
 
         #[cfg(bogus)]
         fn the(&self);
index 1146412ec4f1456550ed7705fc844497bddbd79d..1b5cb86360b207c12c85d8265d492183ea7637e7 100644 (file)
@@ -13,11 +13,11 @@ trait Deserializer {
 }
 
 trait Deserializable<D:Deserializer> {
-    static fn deserialize(&self, d: &D) -> Self;
+    fn deserialize(d: &D) -> Self;
 }
 
 impl<D:Deserializer> Deserializable<D> for int {
-    static fn deserialize(&self, d: &D) -> int {
+    fn deserialize(d: &D) -> int {
         return d.read_int();
     }
 }
index 0c6359375d306e85ac29492b32dbfc6a7561031c..99db34673aeac110075238065efb9f4b717d76a2 100644 (file)
@@ -14,7 +14,7 @@
 // A trait for objects that can be used to do an if-then-else
 // (No actual need for this to be static, but it is a simple test.)
 trait bool_like {
-    static fn select<A>(b: Self, +x1: A, +x2: A) -> A;
+    fn select<A>(b: Self, +x1: A, +x2: A) -> A;
 }
 
 fn andand<T:bool_like + Copy>(x1: T, x2: T) -> T {
@@ -22,35 +22,35 @@ fn andand<T:bool_like + Copy>(x1: T, x2: T) -> T {
 }
 
 impl bool_like for bool {
-    static fn select<A>(&&b: bool, +x1: A, +x2: A) -> A {
+    fn select<A>(&&b: bool, +x1: A, +x2: A) -> A {
         if b { x1 } else { x2 }
     }
 }
 
 impl bool_like for int {
-    static fn select<A>(&&b: int, +x1: A, +x2: A) -> A {
+    fn select<A>(&&b: int, +x1: A, +x2: A) -> A {
         if b != 0 { x1 } else { x2 }
     }
 }
 
 // A trait for sequences that can be constructed imperatively.
 trait buildable<A> {
-     static pure fn build_sized(size: uint,
-                                builder: &fn(push: &pure fn(+v: A))) -> Self;
+     pure fn build_sized(size: uint,
+                         builder: &fn(push: &pure fn(+v: A))) -> Self;
 }
 
 
 impl<A> buildable<A> for @[A] {
     #[inline(always)]
-     static pure fn build_sized(size: uint,
-                                builder: &fn(push: &pure fn(+v: A))) -> @[A] {
+     pure fn build_sized(size: uint,
+                         builder: &fn(push: &pure fn(+v: A))) -> @[A] {
          at_vec::build_sized(size, builder)
      }
 }
 impl<A> buildable<A> for ~[A] {
     #[inline(always)]
-     static pure fn build_sized(size: uint,
-                                builder: &fn(push: &pure fn(+v: A))) -> ~[A] {
+     pure fn build_sized(size: uint,
+                         builder: &fn(push: &pure fn(+v: A))) -> ~[A] {
          vec::build_sized(size, builder)
      }
 }
index be83fe4d3ab889feb91086877642c788d3aed0f4..24bcfcef1e7455f21e3749bef81db0f7f04e2ecf 100644 (file)
 
 mod a {
        pub trait Foo {
-               static pub fn foo() -> Self;
+               pub fn foo() -> Self;
        }
 
        impl Foo for int {
-               static pub fn foo() -> int {
+               pub fn foo() -> int {
                        3
                }
        }
        
        impl Foo for uint {
-               static pub fn foo() -> uint {
+               pub fn foo() -> uint {
                        5u
                }
        }
index 20ab9014c700b156a327e659b317a597acde3c7d..ddf69cda63f121486e0d617dd6bf10d19525ec26 100644 (file)
@@ -1,9 +1,9 @@
 pub trait Number: NumConv {
-    static pure fn from<T:Number>(n: T) -> Self;
+    pure fn from<T:Number>(n: T) -> Self;
 }
 
 impl Number for float {
-    static pure fn from<T:Number>(n: T) -> float { n.to_float() }
+    pure fn from<T:Number>(n: T) -> float { n.to_float() }
 }
 
 pub trait NumConv {
index 7f0d4d77b626480837c116d24fc9c01b5d0258f4..aae430dc4cdf9138d17adb5af6f48196db2a5fdb 100644 (file)
@@ -15,7 +15,7 @@
 use core::num::NumCast::from;
 
 trait Num {
-    static fn from_int(i: int) -> Self;
+    fn from_int(i: int) -> Self;
     fn gt(&self, other: &Self) -> bool;
 }
 
index 1d11870b21ab5e6ecf4e049a5f84718c531c6f54..f3adea18ecdc18a0100f6a5987798271080cfbb7 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 trait MyNum {
-    static fn from_int(int) -> Self;
+    fn from_int(int) -> Self;
 }
 
 pub trait NumExt: MyNum { }
@@ -17,7 +17,7 @@ pub trait NumExt: MyNum { }
 struct S { v: int }
 
 impl MyNum for S {
-    static fn from_int(i: int) -> S {
+    fn from_int(i: int) -> S {
         S {
             v: i
         }
index 30fefa7501f74c6b9c9c709c6229e47d9b92c70a..45369d4ec19d5010c2976f3fd058ead209234249 100644 (file)
@@ -11,7 +11,7 @@
 trait MyEq { }
 
 trait MyNum {
-    static fn from_int(int) -> Self;
+    fn from_int(int) -> Self;
 }
 
 pub trait NumExt: MyEq + MyNum { }
@@ -21,7 +21,7 @@ struct S { v: int }
 impl MyEq for S { }
 
 impl MyNum for S {
-    static fn from_int(i: int) -> S {
+    fn from_int(i: int) -> S {
         S {
             v: i
         }
index 9565919a5d8c7f5cc8b945007b9287cb2e26dac8..40f01fb63c1c5288eaf6bea8d7520e6f19798a83 100644 (file)
@@ -12,7 +12,7 @@
 
 mod base {
     pub trait HasNew<T> {
-        static pure fn new() -> T;
+        pure fn new() -> T;
     }
 
     pub struct Foo {
@@ -20,7 +20,7 @@ pub struct Foo {
     }
 
     impl ::base::HasNew<Foo> for Foo {
-        static pure fn new() -> Foo {
+        pure fn new() -> Foo {
                        unsafe { io::println("Foo"); }
             Foo { dummy: () }
         }
@@ -31,7 +31,7 @@ pub struct Bar {
     }
 
     impl ::base::HasNew<Bar> for Bar {
-        static pure fn new() -> Bar {
+        pure fn new() -> Bar {
                        unsafe { io::println("Bar"); }
             Bar { dummy: () }
         }
index cd914aaa3185b7078e34e5fe200a3ca42bc01f0e..7303f5ecbdf6c102bcc4cb0b3d2e416d9c561c19 100644 (file)
 // methods!
 
 trait Equal {
-    static fn isEq(a: Self, b: Self) -> bool;
+    fn isEq(a: Self, b: Self) -> bool;
 }
 
 enum Color { cyan, magenta, yellow, black }
 
 impl Equal for Color {
-    static fn isEq(a: Color, b: Color) -> bool {
+    fn isEq(a: Color, b: Color) -> bool {
         match (a, b) {
           (cyan, cyan)       => { true  }
           (magenta, magenta) => { true  }
@@ -35,7 +35,7 @@ enum ColorTree {
 }
 
 impl Equal for ColorTree {
-    static fn isEq(a: ColorTree, b: ColorTree) -> bool {
+    fn isEq(a: ColorTree, b: ColorTree) -> bool {
         match (a, b) {
           (leaf(x), leaf(y)) => { Equal::isEq(x, y) }
           (branch(l1, r1), branch(l2, r2)) => {