about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorRemi Rampin <remirampin@gmail.com>2015-07-01 15:51:17 -0400
committerRemi Rampin <remirampin@gmail.com>2015-07-01 15:51:17 -0400
commit8bf4651e2cbe04511c7e92279073e46e33d3b0fc (patch)
treed299656c6f166b11b95fb9457aee6c19dae994d6 /src/liballoc
parent9d67b9f0f90a43e822d09201291603fc0f7601b3 (diff)
downloadrust-8bf4651e2cbe04511c7e92279073e46e33d3b0fc.tar.gz
rust-8bf4651e2cbe04511c7e92279073e46e33d3b0fc.zip
Implement CoerceUnsized for rc::Weak
Fixes #26704
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/rc.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 3dfafd0a378..d461eeea0b7 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -734,6 +734,8 @@ pub struct Weak<T: ?Sized> {
 impl<T: ?Sized> !marker::Send for Weak<T> {}
 impl<T: ?Sized> !marker::Sync for Weak<T> {}
 
+impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
+
 #[unstable(feature = "rc_weak",
            reason = "Weak pointers may not belong in this module.")]
 impl<T: ?Sized> Weak<T> {