about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorRemi Rampin <remirampin@gmail.com>2015-07-01 17:58:05 -0400
committerRemi Rampin <remirampin@gmail.com>2015-07-01 17:58:05 -0400
commit3278e793b2d0332c6659b732178892aab11654ee (patch)
treed94917675e0d945133bf014616229ea42943f718 /src/liballoc
parent50421827ae6bff8085e499eae1427e6c037d76d1 (diff)
downloadrust-3278e793b2d0332c6659b732178892aab11654ee.tar.gz
rust-3278e793b2d0332c6659b732178892aab11654ee.zip
Implement CoerceUnsized for arc::Weak
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index dd9c1d1fd18..c84649f92e7 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -145,6 +145,8 @@ pub struct Weak<T: ?Sized> {
 unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> { }
 unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> { }
 
+impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {