|
70 | 70 | use marker::Sized; |
71 | 71 | use fmt; |
72 | 72 |
|
73 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 73 | +#[cfg(not(stage0))] |
74 | 74 | use marker::Unsize; |
75 | 75 |
|
76 | 76 | /// The `Drop` trait is used to run some code when a value goes out of scope. This |
@@ -1214,39 +1214,39 @@ mod impls { |
1214 | 1214 | /// Trait that indicates that this is a pointer or a wrapper for one, |
1215 | 1215 | /// where unsizing can be performed on the pointee. |
1216 | 1216 | #[unstable(feature = "core")] |
1217 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1217 | +#[cfg(not(stage0))] |
1218 | 1218 | #[lang="coerce_unsized"] |
1219 | 1219 | pub trait CoerceUnsized<T> { |
1220 | 1220 | // Empty. |
1221 | 1221 | } |
1222 | 1222 |
|
1223 | 1223 | // &mut T -> &mut U |
1224 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1224 | +#[cfg(not(stage0))] |
1225 | 1225 | impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {} |
1226 | 1226 | // &mut T -> &U |
1227 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1227 | +#[cfg(not(stage0))] |
1228 | 1228 | impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b mut T {} |
1229 | 1229 | // &mut T -> *mut U |
1230 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1230 | +#[cfg(not(stage0))] |
1231 | 1231 | impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for &'a mut T {} |
1232 | 1232 | // &mut T -> *const U |
1233 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1233 | +#[cfg(not(stage0))] |
1234 | 1234 | impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a mut T {} |
1235 | 1235 |
|
1236 | 1236 | // &T -> &U |
1237 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1237 | +#[cfg(not(stage0))] |
1238 | 1238 | impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {} |
1239 | 1239 | // &T -> *const U |
1240 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1240 | +#[cfg(not(stage0))] |
1241 | 1241 | impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a T {} |
1242 | 1242 |
|
1243 | 1243 | // *mut T -> *mut U |
1244 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1244 | +#[cfg(not(stage0))] |
1245 | 1245 | impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {} |
1246 | 1246 | // *mut T -> *const U |
1247 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1247 | +#[cfg(not(stage0))] |
1248 | 1248 | impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {} |
1249 | 1249 |
|
1250 | 1250 | // *const T -> *const U |
1251 | | -#[cfg(not(stage0))] // SNAP c64d671 |
| 1251 | +#[cfg(not(stage0))] |
1252 | 1252 | impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {} |
0 commit comments