about summary refs log tree commit diff
path: root/src/libcore/dvec.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-09-23 04:39:27 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-09-23 13:30:13 -0500
commitba3eebd41db384c2a46535e8db8c7b2337d55f0b (patch)
tree0a746d1b95cd85358fa07aca67683524c8dd1f79 /src/libcore/dvec.rs
parent2e7ddee8239ceba5989c5dfd83e9a935775b00d1 (diff)
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
Diffstat (limited to 'src/libcore/dvec.rs')
-rw-r--r--src/libcore/dvec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs
index 210ddd483e6..82767112b39 100644
--- a/src/libcore/dvec.rs
+++ b/src/libcore/dvec.rs
@@ -93,7 +93,7 @@ priv impl<A> DVec<A> {
     }
 
     #[inline(always)]
-    fn check_out<B>(f: fn(-~[A]) -> B) -> B {
+    fn check_out<B>(f: fn(-v: ~[A]) -> B) -> B {
         unsafe {
             let mut data = cast::reinterpret_cast(&null::<()>());
             data <-> self.data;
@@ -126,7 +126,7 @@ impl<A> DVec<A> {
      * and return a new vector to replace it with.
      */
     #[inline(always)]
-    fn swap(f: fn(-~[A]) -> ~[A]) {
+    fn swap(f: fn(-v: ~[A]) -> ~[A]) {
         self.check_out(|v| self.give_back(f(move v)))
     }
 
@@ -136,7 +136,7 @@ impl<A> DVec<A> {
      * and return a new vector to replace it with.
      */
     #[inline(always)]
-    fn swap_mut(f: fn(-~[mut A]) -> ~[mut A]) {
+    fn swap_mut(f: fn(-v: ~[mut A]) -> ~[mut A]) {
         do self.swap |v| {
             vec::from_mut(f(vec::to_mut(move v)))
         }