@@ -1046,7 +1046,7 @@ unsafe impl<O, T: ?Sized> Send for OwningRefMut<O, T>
1046
1046
unsafe impl < O , T : ?Sized > Sync for OwningRefMut < O , T >
1047
1047
where O : Sync , for < ' a > ( & ' a mut T ) : Sync { }
1048
1048
1049
- impl Debug for Erased {
1049
+ impl Debug for dyn Erased {
1050
1050
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1051
1051
write ! ( f, "<Erased>" , )
1052
1052
}
@@ -1166,35 +1166,35 @@ pub type MutexGuardRefMut<'a, T, U = T> = OwningRefMut<MutexGuard<'a, T>, U>;
1166
1166
pub type RwLockWriteGuardRefMut < ' a , T , U = T > = OwningRef < RwLockWriteGuard < ' a , T > , U > ;
1167
1167
1168
1168
unsafe impl < ' a , T : ' a > IntoErased < ' a > for Box < T > {
1169
- type Erased = Box < Erased + ' a > ;
1169
+ type Erased = Box < dyn Erased + ' a > ;
1170
1170
fn into_erased ( self ) -> Self :: Erased {
1171
1171
self
1172
1172
}
1173
1173
}
1174
1174
unsafe impl < ' a , T : ' a > IntoErased < ' a > for Rc < T > {
1175
- type Erased = Rc < Erased + ' a > ;
1175
+ type Erased = Rc < dyn Erased + ' a > ;
1176
1176
fn into_erased ( self ) -> Self :: Erased {
1177
1177
self
1178
1178
}
1179
1179
}
1180
1180
unsafe impl < ' a , T : ' a > IntoErased < ' a > for Arc < T > {
1181
- type Erased = Arc < Erased + ' a > ;
1181
+ type Erased = Arc < dyn Erased + ' a > ;
1182
1182
fn into_erased ( self ) -> Self :: Erased {
1183
1183
self
1184
1184
}
1185
1185
}
1186
1186
1187
1187
unsafe 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 > ;
1189
1189
fn into_erased_send ( self ) -> Self :: Erased {
1190
1190
self
1191
1191
}
1192
1192
}
1193
1193
1194
1194
unsafe 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 > ;
1196
1196
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 ;
1198
1198
// This is safe since Erased can always implement Sync
1199
1199
// Only the destructor is available and it takes &mut self
1200
1200
unsafe {
@@ -1204,21 +1204,21 @@ unsafe impl<'a, T: Send + 'a> IntoErasedSendSync<'a> for Box<T> {
1204
1204
}
1205
1205
1206
1206
unsafe 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 > ;
1208
1208
fn into_erased_send_sync ( self ) -> Self :: Erased {
1209
1209
self
1210
1210
}
1211
1211
}
1212
1212
1213
1213
/// 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 > ;
1215
1215
/// 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 > ;
1217
1217
/// 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 > ;
1219
1219
1220
1220
/// 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 > ;
1222
1222
1223
1223
#[ cfg( test) ]
1224
1224
mod tests {
0 commit comments