diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2013-03-06 04:00:25 -0500 |
|---|---|---|
| committer | Ben Striegel <ben.striegel@gmail.com> | 2013-03-06 04:00:25 -0500 |
| commit | 12f06bb496cf5f3ec692f2b71309bb56d4571992 (patch) | |
| tree | 6f732380151c44a2f086ebd95f70e06446538fbe /src | |
| parent | 959e483fb705e99097a85ce42371bd57b78bd180 (diff) | |
| download | rust-12f06bb496cf5f3ec692f2b71309bb56d4571992.tar.gz rust-12f06bb496cf5f3ec692f2b71309bb56d4571992.zip | |
Finish de-implicit-selifizng libcore
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/core.rc | 1 | ||||
| -rw-r--r-- | src/libcore/dvec.rs | 2 | ||||
| -rw-r--r-- | src/libcore/hash.rs | 5 | ||||
| -rw-r--r-- | src/libcore/unstable.rs | 6 | ||||
| -rw-r--r-- | src/librustpkg/util.rs | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 54644281edf..ccfeb0de0e7 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -50,7 +50,6 @@ Implicitly, all crates behave as if they included the following prologue: #[warn(vecs_implicitly_copyable)]; #[deny(non_camel_case_types)]; -#[allow(deprecated_self)]; #[allow(deprecated_mutable_fields)]; /* The Prelude. */ diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs index 7eb615d07a6..43daf5fa6a5 100644 --- a/src/libcore/dvec.rs +++ b/src/libcore/dvec.rs @@ -108,7 +108,7 @@ priv impl<A> DVec<A> { pub impl<A> DVec<A> { // FIXME (#3758): This should not need to be public. #[inline(always)] - fn check_out<B>(f: &fn(v: ~[A]) -> B) -> B { + fn check_out<B>(&self, f: &fn(v: ~[A]) -> B) -> B { unsafe { let mut data = cast::reinterpret_cast(&null::<()>()); data <-> self.data; diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs index 2587b84b274..8f3f81d167e 100644 --- a/src/libcore/hash.rs +++ b/src/libcore/hash.rs @@ -68,7 +68,7 @@ pub trait Streaming { fn input(&self, (&[const u8])); // These can be refactored some when we have default methods. fn result_bytes(&self) -> ~[u8]; - fn result_str() -> ~str; + fn result_str(&self) -> ~str; fn result_u64(&self) -> u64; fn reset(&self); } @@ -349,8 +349,7 @@ impl Streaming for &SipState { ] } - // IMPLICIT SELF WARNING: fix me! - fn result_str() -> ~str { + fn result_str(&self) -> ~str { let r = self.result_bytes(); let mut s = ~""; for vec::each(r) |b| { diff --git a/src/libcore/unstable.rs b/src/libcore/unstable.rs index dcec424f290..8169b957898 100644 --- a/src/libcore/unstable.rs +++ b/src/libcore/unstable.rs @@ -228,7 +228,7 @@ fn LittleLock() -> LittleLock { pub impl LittleLock { #[inline(always)] - unsafe fn lock<T>(f: fn() -> T) -> T { + unsafe fn lock<T>(&self, f: fn() -> T) -> T { struct Unlock { l: rust_little_lock, drop { @@ -280,7 +280,7 @@ pub impl<T:Owned> Exclusive<T> { // accessing the provided condition variable) are prohibited while inside // the exclusive. Supporting that is a work in progress. #[inline(always)] - unsafe fn with<U>(f: fn(x: &mut T) -> U) -> U { + unsafe fn with<U>(&self, f: fn(x: &mut T) -> U) -> U { unsafe { let rec = get_shared_mutable_state(&self.x); do (*rec).lock.lock { @@ -297,7 +297,7 @@ pub impl<T:Owned> Exclusive<T> { } #[inline(always)] - unsafe fn with_imm<U>(f: fn(x: &T) -> U) -> U { + unsafe fn with_imm<U>(&self, f: fn(x: &T) -> U) -> U { do self.with |x| { f(cast::transmute_immut(x)) } diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index d7428ae15e7..32f9593d9a6 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -253,7 +253,7 @@ pub fn error(msg: ~str) { } pub fn hash(data: ~str) -> ~str { - let hasher = hash::default_state(); + let hasher = &hash::default_state(); hasher.write_str(data); hasher.result_str() |
