From ba3eebd41db384c2a46535e8db8c7b2337d55f0b Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sun, 23 Sep 2012 04:39:27 -0700 Subject: Make it illegal to use modes in a fn signature with providing an explicit variable name. (Step one to changing the defaults) First step to #3535 --- src/libstd/arc.rs | 2 +- src/libstd/bitv.rs | 2 +- src/libstd/map.rs | 2 +- src/libstd/sync.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs index c5b1aafc020..4ffe7245113 100644 --- a/src/libstd/arc.rs +++ b/src/libstd/arc.rs @@ -340,7 +340,7 @@ impl &RWARC { * } * ~~~ */ - fn write_downgrade(blk: fn(+RWWriteMode) -> U) -> U { + fn write_downgrade(blk: fn(+v: RWWriteMode) -> U) -> U { let state = unsafe { get_shared_mutable_state(&self.x) }; do borrow_rwlock(state).write_downgrade |write_mode| { check_poison(false, state.failed); diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs index 21864ec0e7f..2c0a3716411 100644 --- a/src/libstd/bitv.rs +++ b/src/libstd/bitv.rs @@ -140,7 +140,7 @@ impl BigBitv { } #[inline(always)] - fn each_storage(op: fn(&uint) -> bool) { + fn each_storage(op: fn(&v: uint) -> bool) { for uint::range(0, self.storage.len()) |i| { let mut w = self.storage[i]; let b = !op(w); diff --git a/src/libstd/map.rs b/src/libstd/map.rs index f28d7694b20..adaab0050bb 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -33,7 +33,7 @@ trait Map { * * Returns true if the key did not already exist in the map */ - fn insert(+K, +V) -> bool; + fn insert(+v: K, +v: V) -> bool; /// Returns true if the map contains a value for the specified key fn contains_key(+key: K) -> bool; diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index 0fd80d4acf4..8fdcc22b4c1 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -539,7 +539,7 @@ impl &RWlock { * } * ~~~ */ - fn write_downgrade(blk: fn(+RWlockWriteMode) -> U) -> U { + fn write_downgrade(blk: fn(+v: RWlockWriteMode) -> U) -> U { // Implementation slightly different from the slicker 'write's above. // The exit path is conditional on whether the caller downgrades. let mut _release = None; -- cgit 1.4.1-3-g733a5