|
1 | 1 | #![unstable(feature = "ptr_metadata", issue = "81513")]
|
2 | 2 |
|
3 | 3 | use crate::fmt;
|
4 |
| -use crate::hash::{Hash, Hasher}; |
5 | 4 |
|
6 | 5 | /// Provides the pointer metadata type of any pointed-to type.
|
7 | 6 | ///
|
@@ -57,7 +56,7 @@ pub trait Pointee {
|
57 | 56 | // NOTE: Keep trait bounds in `static_assert_expected_bounds_for_metadata`
|
58 | 57 | // in `library/core/src/ptr/metadata.rs`
|
59 | 58 | // in sync with those here:
|
60 |
| - type Metadata: Copy + Send + Sync + Ord + Hash + Unpin; |
| 59 | + type Metadata: Copy + Send + Sync + Unpin; |
61 | 60 | }
|
62 | 61 |
|
63 | 62 | /// Pointers to types implementing this trait alias are “thin”.
|
@@ -241,33 +240,3 @@ impl<Dyn: ?Sized> Clone for DynMetadata<Dyn> {
|
241 | 240 | *self
|
242 | 241 | }
|
243 | 242 | }
|
244 |
| - |
245 |
| -impl<Dyn: ?Sized> Eq for DynMetadata<Dyn> {} |
246 |
| - |
247 |
| -impl<Dyn: ?Sized> PartialEq for DynMetadata<Dyn> { |
248 |
| - #[inline] |
249 |
| - fn eq(&self, other: &Self) -> bool { |
250 |
| - crate::ptr::eq::<VTable>(self.vtable_ptr, other.vtable_ptr) |
251 |
| - } |
252 |
| -} |
253 |
| - |
254 |
| -impl<Dyn: ?Sized> Ord for DynMetadata<Dyn> { |
255 |
| - #[inline] |
256 |
| - fn cmp(&self, other: &Self) -> crate::cmp::Ordering { |
257 |
| - (self.vtable_ptr as *const VTable).cmp(&(other.vtable_ptr as *const VTable)) |
258 |
| - } |
259 |
| -} |
260 |
| - |
261 |
| -impl<Dyn: ?Sized> PartialOrd for DynMetadata<Dyn> { |
262 |
| - #[inline] |
263 |
| - fn partial_cmp(&self, other: &Self) -> Option<crate::cmp::Ordering> { |
264 |
| - Some(self.cmp(other)) |
265 |
| - } |
266 |
| -} |
267 |
| - |
268 |
| -impl<Dyn: ?Sized> Hash for DynMetadata<Dyn> { |
269 |
| - #[inline] |
270 |
| - fn hash<H: Hasher>(&self, hasher: &mut H) { |
271 |
| - crate::ptr::hash::<VTable, _>(self.vtable_ptr, hasher) |
272 |
| - } |
273 |
| -} |
0 commit comments