summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-07 11:31:25 +0000
committerbors <bors@rust-lang.org>2014-11-07 11:31:25 +0000
commit97a57ec909e61ecabadfce11fb9b36b2fe3783df (patch)
treeeb496871cde9494ec1a7900589b6ed1e36a22b7e /src/liballoc
parent932eec7d702cf2cf55554e2431c3cb0fecd19014 (diff)
parentf2aaed8338d80afccd2159d9c819d8d0f300cb55 (diff)
downloadrust-97a57ec909e61ecabadfce11fb9b36b2fe3783df.tar.gz
rust-97a57ec909e61ecabadfce11fb9b36b2fe3783df.zip
auto merge of #18714 : nikomatsakis/rust/issue-18621-deref-for-refs, r=aturon
libs: add Deref, DerefMut impls for references, fixing a bug in compiler in the process that was blocking this.

r? @aturon 
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index f543826fe01..c4f53d74467 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -166,7 +166,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
         // additional reference of either kind.
         if self.inner().strong.load(atomic::SeqCst) != 1 ||
            self.inner().weak.load(atomic::SeqCst) != 1 {
-            *self = Arc::new(self.deref().clone())
+            *self = Arc::new((**self).clone())
         }
         // This unsafety is ok because we're guaranteed that the pointer
         // returned is the *only* pointer that will ever be returned to T. Our