File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1857,6 +1857,7 @@ impl<T: ?Sized> Ord for *const T {
1857
1857
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1858
1858
impl < T : ?Sized > PartialOrd for * const T {
1859
1859
#[ inline]
1860
+ #[ allow( ambiguous_wide_pointer_comparisons) ]
1860
1861
fn partial_cmp ( & self , other : & * const T ) -> Option < Ordering > {
1861
1862
Some ( self . cmp ( other) )
1862
1863
}
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ impl<Dyn: ?Sized> PartialEq for DynMetadata<Dyn> {
258
258
259
259
impl < Dyn : ?Sized > Ord for DynMetadata < Dyn > {
260
260
#[ inline]
261
+ #[ allow( ambiguous_wide_pointer_comparisons) ]
261
262
fn cmp ( & self , other : & Self ) -> crate :: cmp:: Ordering {
262
263
( self . vtable_ptr as * const VTable ) . cmp ( & ( other. vtable_ptr as * const VTable ) )
263
264
}
Original file line number Diff line number Diff line change @@ -2275,6 +2275,7 @@ impl<T: ?Sized> Ord for *mut T {
2275
2275
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2276
2276
impl < T : ?Sized > PartialOrd for * mut T {
2277
2277
#[ inline( always) ]
2278
+ #[ allow( ambiguous_wide_pointer_comparisons) ]
2278
2279
fn partial_cmp ( & self , other : & * mut T ) -> Option < Ordering > {
2279
2280
Some ( self . cmp ( other) )
2280
2281
}
Original file line number Diff line number Diff line change @@ -1821,6 +1821,7 @@ impl<T: ?Sized> PartialEq for NonNull<T> {
1821
1821
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
1822
1822
impl < T : ?Sized > Ord for NonNull < T > {
1823
1823
#[ inline]
1824
+ #[ allow( ambiguous_wide_pointer_comparisons) ]
1824
1825
fn cmp ( & self , other : & Self ) -> Ordering {
1825
1826
self . as_ptr ( ) . cmp ( & other. as_ptr ( ) )
1826
1827
}
@@ -1829,6 +1830,7 @@ impl<T: ?Sized> Ord for NonNull<T> {
1829
1830
#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
1830
1831
impl < T : ?Sized > PartialOrd for NonNull < T > {
1831
1832
#[ inline]
1833
+ #[ allow( ambiguous_wide_pointer_comparisons) ]
1832
1834
fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
1833
1835
self . as_ptr ( ) . partial_cmp ( & other. as_ptr ( ) )
1834
1836
}
You can’t perform that action at this time.
0 commit comments