diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-21 19:07:54 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-22 10:27:39 -0700 |
| commit | 4634f7edaefafa3e5ece93499e08992b4c8c7145 (patch) | |
| tree | aa695c6ea7ffa0d19919584e9636b3f78b1f40ab /src/libsyntax | |
| parent | 1616ffd0c2627502b1015b6388480ed7429ef042 (diff) | |
| download | rust-4634f7edaefafa3e5ece93499e08992b4c8c7145.tar.gz rust-4634f7edaefafa3e5ece93499e08992b4c8c7145.zip | |
librustc: Remove all uses of `static` from functions. rs=destatic
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/codemap.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/base.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/util/interner.rs | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index cbdcef3eff6..edf73155731 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -75,7 +75,7 @@ impl<S:Encoder> Encodable<S> for ident { } 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!()) } { diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index c84e3abf50b..06d915cfed8 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -30,7 +30,7 @@ use core::uint; 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 struct CharPos(uint); // 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 @@ impl<S:Encoder> Encodable<S> for span { } 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 ~[], } diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index e5f818eef5c..54ca5dc0d72 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -32,7 +32,7 @@ impl<S:std::serialize::Encoder> Encodable<S> for Node { } 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 @@ would yield functions like: 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)), diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 50f89d37fae..4e3b4f2739e 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -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) } diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index b4a85ce1617..d0850d2bd2a 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -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 |
