about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-21 19:07:54 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-22 10:27:39 -0700
commit4634f7edaefafa3e5ece93499e08992b4c8c7145 (patch)
treeaa695c6ea7ffa0d19919584e9636b3f78b1f40ab /src/libstd
parent1616ffd0c2627502b1015b6388480ed7429ef042 (diff)
downloadrust-4634f7edaefafa3e5ece93499e08992b4c8c7145.tar.gz
rust-4634f7edaefafa3e5ece93499e08992b4c8c7145.zip
librustc: Remove all uses of `static` from functions. rs=destatic
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/bigint.rs38
-rw-r--r--src/libstd/bitv.rs10
-rw-r--r--src/libstd/deque.rs2
-rw-r--r--src/libstd/flatpipes.rs32
-rw-r--r--src/libstd/io_util.rs2
-rw-r--r--src/libstd/net_url.rs6
-rw-r--r--src/libstd/priority_queue.rs4
-rw-r--r--src/libstd/serialize.rs54
-rw-r--r--src/libstd/smallintmap.rs2
-rw-r--r--src/libstd/task_pool.rs7
-rw-r--r--src/libstd/time.rs2
-rw-r--r--src/libstd/treemap.rs6
-rw-r--r--src/libstd/workcache.rs8
13 files changed, 87 insertions, 86 deletions
diff --git a/src/libstd/bigint.rs b/src/libstd/bigint.rs
index 01153a4b78e..daf5d492ccf 100644
--- a/src/libstd/bigint.rs
+++ b/src/libstd/bigint.rs
@@ -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;
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs
index d4b4c7b097c..2dcebcb276c 100644
--- a/src/libstd/bitv.rs
+++ b/src/libstd/bitv.rs
@@ -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 @@ priv impl Bitv {
 }
 
 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;
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs
index 64d28dcde83..d8906fbd90a 100644
--- a/src/libstd/deque.rs
+++ b/src/libstd/deque.rs
@@ -43,7 +43,7 @@ impl<T> Mutable for Deque<T> {
 
 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)}
     }
diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs
index 105e34761a8..9855e803ccb 100644
--- a/src/libstd/flatpipes.rs
+++ b/src/libstd/flatpipes.rs
@@ -314,7 +314,7 @@ impl<T,F:Flattener<T>,C:ByteChan> GenericChan<T> for FlatChan<T, F, C> {
 }
 
 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 @@ pub mod flatteners {
     }
 
     pub impl<T:Copy + Owned> PodUnflattener<T> {
-        static fn new() -> PodUnflattener<T> {
+        fn new() -> PodUnflattener<T> {
             PodUnflattener {
                 bogus: ()
             }
@@ -384,7 +384,7 @@ pub mod flatteners {
     }
 
     pub impl<T:Copy + Owned> PodFlattener<T> {
-        static fn new() -> PodFlattener<T> {
+        fn new() -> PodFlattener<T> {
             PodFlattener {
                 bogus: ()
             }
@@ -419,7 +419,7 @@ pub mod flatteners {
     }
 
     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 mod flatteners {
     }
 
     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 mod flatteners {
     }
 
     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 @@ pub mod flatteners {
     }
 
     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 @@ pub mod flatteners {
     }
 
     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 @@ pub mod bytepipes {
     }
 
     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 mod bytepipes {
     }
 
     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 @@ pub mod bytepipes {
     }
 
     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 mod bytepipes {
     }
 
     pub impl PipeByteChan {
-        static fn new(c: Chan<~[u8]>) -> PipeByteChan {
+        fn new(c: Chan<~[u8]>) -> PipeByteChan {
             PipeByteChan {
                 chan: c
             }
diff --git a/src/libstd/io_util.rs b/src/libstd/io_util.rs
index 7d673feaf25..50d2eb6a785 100644
--- a/src/libstd/io_util.rs
+++ b/src/libstd/io_util.rs
@@ -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
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index 6fb4f6747a3..49dc6f90740 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -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 @@ pub pure fn from_str(rawurl: &str) -> Result<Url, ~str> {
 }
 
 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
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs
index a5a291c5b18..7dad2ebbd8b 100644
--- a/src/libstd/priority_queue.rs
+++ b/src/libstd/priority_queue.rs
@@ -118,10 +118,10 @@ pub impl <T:Ord> PriorityQueue<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 {
diff --git a/src/libstd/serialize.rs b/src/libstd/serialize.rs
index 2c927b5db16..d288c06d293 100644
--- a/src/libstd/serialize.rs
+++ b/src/libstd/serialize.rs
@@ -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 @@ impl<S:Encoder> Encodable<S> for uint {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for u8 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for u16 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for u32 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for u64 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for int {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for i8 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for i16 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for i32 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for i64 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for ~str {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for @str {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for float {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for f32 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for f64 {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for bool {
 }
 
 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 @@ impl<S:Encoder> Encodable<S> for () {
 }
 
 impl<D:Decoder> Decodable<D> for () {
-    static fn decode(&self, d: &D) -> () {
+    fn decode(d: &D) -> () {
         d.read_nil()
     }
 }
@@ -299,7 +299,7 @@ impl<S:Encoder,T:Encodable<S>> Encodable<S> for ~T {
 }
 
 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 @@ impl<S:Encoder,T:Encodable<S>> Encodable<S> for @T {
 }
 
 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 @@ impl<S:Encoder,T:Encodable<S>> Encodable<S> for ~[T] {
 }
 
 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 @@ impl<S:Encoder,T:Encodable<S>> Encodable<S> for @[T] {
 }
 
 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 @@ impl<S:Encoder,T:Encodable<S>> Encodable<S> for Option<T> {
 }
 
 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 @@ impl<S:Encoder,T0:Encodable<S>,T1:Encodable<S>> Encodable<S> for (T0, T1) {
 }
 
 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) {
             (
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs
index dc2688a20e7..6a6635bae90 100644
--- a/src/libstd/smallintmap.rs
+++ b/src/libstd/smallintmap.rs
@@ -135,7 +135,7 @@ impl<V> Map<uint, V> for SmallIntMap<V> {
 
 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")
diff --git a/src/libstd/task_pool.rs b/src/libstd/task_pool.rs
index d8ca5559f42..16645f151ee 100644
--- a/src/libstd/task_pool.rs
+++ b/src/libstd/task_pool.rs
@@ -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| {
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index c72b3675c4c..faebe268564 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -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 }
     }
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index f4d58568ae7..045d51c1567 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -176,7 +176,7 @@ impl<K: TotalOrd, V> Map<K, V> for TreeMap<K, V> {
 
 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 @@ impl<T: TotalOrd> Set<T> for TreeSet<T> {
 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}
     }
 }
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index f8b4337e437..46335d062b4 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -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 @@ impl<S:Encoder> Encodable<S> for WorkMap {
 }
 
 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 @@ impl TPrep for @Mut<Prep> {
 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) }
     }
 }