about summary refs log tree commit diff
path: root/src/libcore/mutable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/mutable.rs')
-rw-r--r--src/libcore/mutable.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/mutable.rs b/src/libcore/mutable.rs
index f888fbdb40c..e4b8d204dd7 100644
--- a/src/libcore/mutable.rs
+++ b/src/libcore/mutable.rs
@@ -44,7 +44,7 @@ pub fn unwrap<T>(m: Mut<T>) -> T {
 }
 
 pub impl<T> Data<T> {
-    fn borrow_mut<R>(op: &fn(t: &mut T) -> R) -> R {
+    fn borrow_mut<R>(&self, op: &fn(t: &mut T) -> R) -> R {
         match self.mode {
             Immutable => fail!(fmt!("%? currently immutable",
                                    self.value)),
@@ -56,11 +56,11 @@ pub impl<T> Data<T> {
         }
     }
 
-    pure fn borrow_const<R>(op: &fn(t: &const T) -> R) -> R {
+    pure fn borrow_const<R>(&self, op: &fn(t: &const T) -> R) -> R {
         op(&const self.value)
     }
 
-    fn borrow_imm<R>(op: &fn(t: &T) -> R) -> R {
+    fn borrow_imm<R>(&self, op: &fn(t: &T) -> R) -> R {
         match self.mode {
           Mutable => fail!(fmt!("%? currently mutable",
                                self.value)),