diff options
| author | Remi Rampin <remirampin@gmail.com> | 2015-07-01 17:58:05 -0400 |
|---|---|---|
| committer | Remi Rampin <remirampin@gmail.com> | 2015-07-01 17:58:05 -0400 |
| commit | 3278e793b2d0332c6659b732178892aab11654ee (patch) | |
| tree | d94917675e0d945133bf014616229ea42943f718 /src/liballoc | |
| parent | 50421827ae6bff8085e499eae1427e6c037d76d1 (diff) | |
| download | rust-3278e793b2d0332c6659b732178892aab11654ee.tar.gz rust-3278e793b2d0332c6659b732178892aab11654ee.zip | |
Implement CoerceUnsized for arc::Weak
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 2 |
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 { |
