From f2aaed8338d80afccd2159d9c819d8d0f300cb55 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 6 Nov 2014 17:34:33 -0500 Subject: libs: add Deref, DerefMut impls for references, fixing a bug in compiler in the process that was blocking this. Fixes #18621. --- src/liballoc/arc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/liballoc') 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 Arc { // 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 -- cgit 1.4.1-3-g733a5