Skip to content

Commit 67100dd

Browse files
committed
auto merge of #5251 : bstrie/rust/deimpselfcore2, r=pcwalton
2 parents 959e483 + 12f06bb commit 67100dd

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

src/libcore/core.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Implicitly, all crates behave as if they included the following prologue:
5050

5151
#[warn(vecs_implicitly_copyable)];
5252
#[deny(non_camel_case_types)];
53-
#[allow(deprecated_self)];
5453
#[allow(deprecated_mutable_fields)];
5554

5655
/* The Prelude. */

src/libcore/dvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ priv impl<A> DVec<A> {
108108
pub impl<A> DVec<A> {
109109
// FIXME (#3758): This should not need to be public.
110110
#[inline(always)]
111-
fn check_out<B>(f: &fn(v: ~[A]) -> B) -> B {
111+
fn check_out<B>(&self, f: &fn(v: ~[A]) -> B) -> B {
112112
unsafe {
113113
let mut data = cast::reinterpret_cast(&null::<()>());
114114
data <-> self.data;

src/libcore/hash.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub trait Streaming {
6868
fn input(&self, (&[const u8]));
6969
// These can be refactored some when we have default methods.
7070
fn result_bytes(&self) -> ~[u8];
71-
fn result_str() -> ~str;
71+
fn result_str(&self) -> ~str;
7272
fn result_u64(&self) -> u64;
7373
fn reset(&self);
7474
}
@@ -349,8 +349,7 @@ impl Streaming for &SipState {
349349
]
350350
}
351351

352-
// IMPLICIT SELF WARNING: fix me!
353-
fn result_str() -> ~str {
352+
fn result_str(&self) -> ~str {
354353
let r = self.result_bytes();
355354
let mut s = ~"";
356355
for vec::each(r) |b| {

src/libcore/unstable.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ fn LittleLock() -> LittleLock {
228228

229229
pub impl LittleLock {
230230
#[inline(always)]
231-
unsafe fn lock<T>(f: fn() -> T) -> T {
231+
unsafe fn lock<T>(&self, f: fn() -> T) -> T {
232232
struct Unlock {
233233
l: rust_little_lock,
234234
drop {
@@ -280,7 +280,7 @@ pub impl<T:Owned> Exclusive<T> {
280280
// accessing the provided condition variable) are prohibited while inside
281281
// the exclusive. Supporting that is a work in progress.
282282
#[inline(always)]
283-
unsafe fn with<U>(f: fn(x: &mut T) -> U) -> U {
283+
unsafe fn with<U>(&self, f: fn(x: &mut T) -> U) -> U {
284284
unsafe {
285285
let rec = get_shared_mutable_state(&self.x);
286286
do (*rec).lock.lock {
@@ -297,7 +297,7 @@ pub impl<T:Owned> Exclusive<T> {
297297
}
298298

299299
#[inline(always)]
300-
unsafe fn with_imm<U>(f: fn(x: &T) -> U) -> U {
300+
unsafe fn with_imm<U>(&self, f: fn(x: &T) -> U) -> U {
301301
do self.with |x| {
302302
f(cast::transmute_immut(x))
303303
}

src/librustpkg/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ pub fn error(msg: ~str) {
253253
}
254254
255255
pub fn hash(data: ~str) -> ~str {
256-
let hasher = hash::default_state();
256+
let hasher = &hash::default_state();
257257
258258
hasher.write_str(data);
259259
hasher.result_str()

0 commit comments

Comments
 (0)