@@ -1046,7 +1046,7 @@ unsafe impl<O, T: ?Sized> Send for OwningRefMut<O, T>
10461046unsafe impl < O , T : ?Sized > Sync for OwningRefMut < O , T >
10471047 where O : Sync , for < ' a > ( & ' a mut T ) : Sync { }
10481048
1049- impl Debug for Erased {
1049+ impl Debug for dyn Erased {
10501050 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
10511051 write ! ( f, "<Erased>" , )
10521052 }
@@ -1166,35 +1166,35 @@ pub type MutexGuardRefMut<'a, T, U = T> = OwningRefMut<MutexGuard<'a, T>, U>;
11661166pub type RwLockWriteGuardRefMut < ' a , T , U = T > = OwningRef < RwLockWriteGuard < ' a , T > , U > ;
11671167
11681168unsafe impl < ' a , T : ' a > IntoErased < ' a > for Box < T > {
1169- type Erased = Box < Erased + ' a > ;
1169+ type Erased = Box < dyn Erased + ' a > ;
11701170 fn into_erased ( self ) -> Self :: Erased {
11711171 self
11721172 }
11731173}
11741174unsafe impl < ' a , T : ' a > IntoErased < ' a > for Rc < T > {
1175- type Erased = Rc < Erased + ' a > ;
1175+ type Erased = Rc < dyn Erased + ' a > ;
11761176 fn into_erased ( self ) -> Self :: Erased {
11771177 self
11781178 }
11791179}
11801180unsafe impl < ' a , T : ' a > IntoErased < ' a > for Arc < T > {
1181- type Erased = Arc < Erased + ' a > ;
1181+ type Erased = Arc < dyn Erased + ' a > ;
11821182 fn into_erased ( self ) -> Self :: Erased {
11831183 self
11841184 }
11851185}
11861186
11871187unsafe impl < ' a , T : Send + ' a > IntoErasedSend < ' a > for Box < T > {
1188- type Erased = Box < Erased + Send + ' a > ;
1188+ type Erased = Box < dyn Erased + Send + ' a > ;
11891189 fn into_erased_send ( self ) -> Self :: Erased {
11901190 self
11911191 }
11921192}
11931193
11941194unsafe impl < ' a , T : Send + ' a > IntoErasedSendSync < ' a > for Box < T > {
1195- type Erased = Box < Erased + Sync + Send + ' a > ;
1195+ type Erased = Box < dyn Erased + Sync + Send + ' a > ;
11961196 fn into_erased_send_sync ( self ) -> Self :: Erased {
1197- let result: Box < Erased + Send + ' a > = self ;
1197+ let result: Box < dyn Erased + Send + ' a > = self ;
11981198 // This is safe since Erased can always implement Sync
11991199 // Only the destructor is available and it takes &mut self
12001200 unsafe {
@@ -1204,21 +1204,21 @@ unsafe impl<'a, T: Send + 'a> IntoErasedSendSync<'a> for Box<T> {
12041204}
12051205
12061206unsafe impl < ' a , T : Send + Sync + ' a > IntoErasedSendSync < ' a > for Arc < T > {
1207- type Erased = Arc < Erased + Send + Sync + ' a > ;
1207+ type Erased = Arc < dyn Erased + Send + Sync + ' a > ;
12081208 fn into_erased_send_sync ( self ) -> Self :: Erased {
12091209 self
12101210 }
12111211}
12121212
12131213/// Typedef of a owning reference that uses an erased `Box` as the owner.
1214- pub type ErasedBoxRef < U > = OwningRef < Box < Erased > , U > ;
1214+ pub type ErasedBoxRef < U > = OwningRef < Box < dyn Erased > , U > ;
12151215/// Typedef of a owning reference that uses an erased `Rc` as the owner.
1216- pub type ErasedRcRef < U > = OwningRef < Rc < Erased > , U > ;
1216+ pub type ErasedRcRef < U > = OwningRef < Rc < dyn Erased > , U > ;
12171217/// Typedef of a owning reference that uses an erased `Arc` as the owner.
1218- pub type ErasedArcRef < U > = OwningRef < Arc < Erased > , U > ;
1218+ pub type ErasedArcRef < U > = OwningRef < Arc < dyn Erased > , U > ;
12191219
12201220/// Typedef of a mutable owning reference that uses an erased `Box` as the owner.
1221- pub type ErasedBoxRefMut < U > = OwningRefMut < Box < Erased > , U > ;
1221+ pub type ErasedBoxRefMut < U > = OwningRefMut < Box < dyn Erased > , U > ;
12221222
12231223#[ cfg( test) ]
12241224mod tests {
0 commit comments