diff options
Diffstat (limited to 'src/libstd/rc.rs')
| -rw-r--r-- | src/libstd/rc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rc.rs b/src/libstd/rc.rs index cc2f739ce98..9e83afa819c 100644 --- a/src/libstd/rc.rs +++ b/src/libstd/rc.rs @@ -203,7 +203,7 @@ impl<T> RcMut<T> { impl<T> RcMut<T> { /// Fails if there is already a mutable borrow of the box #[inline] - pub fn with_borrow<U>(&self, f: &fn(&T) -> U) -> U { + pub fn with_borrow<U>(&self, f: |&T| -> U) -> U { unsafe { assert!((*self.ptr).borrow != Mutable); let previous = (*self.ptr).borrow; @@ -216,7 +216,7 @@ impl<T> RcMut<T> { /// Fails if there is already a mutable or immutable borrow of the box #[inline] - pub fn with_mut_borrow<U>(&self, f: &fn(&mut T) -> U) -> U { + pub fn with_mut_borrow<U>(&self, f: |&mut T| -> U) -> U { unsafe { assert_eq!((*self.ptr).borrow, Nothing); (*self.ptr).borrow = Mutable; |
