about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-11-06 17:34:33 -0500
committerNiko Matsakis <niko@alum.mit.edu>2014-11-06 21:51:40 -0500
commitf2aaed8338d80afccd2159d9c819d8d0f300cb55 (patch)
tree12bd4214839b3f780154483f18a4fa86facf2151 /src/liballoc
parente84e7a00ddec76570bbaa9afea385d544f616814 (diff)
downloadrust-f2aaed8338d80afccd2159d9c819d8d0f300cb55.tar.gz
rust-f2aaed8338d80afccd2159d9c819d8d0f300cb55.zip
libs: add Deref, DerefMut impls for references, fixing a bug in compiler in the process that was blocking this.
Fixes #18621.
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