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 {
18571857#[ stable( feature = "rust1" , since = "1.0.0" ) ]
18581858impl < T : ?Sized > PartialOrd for * const T {
18591859 #[ inline]
1860+ #[ allow( ambiguous_wide_pointer_comparisons) ]
18601861 fn partial_cmp ( & self , other : & * const T ) -> Option < Ordering > {
18611862 Some ( self . cmp ( other) )
18621863 }
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ impl<Dyn: ?Sized> PartialEq for DynMetadata<Dyn> {
258258
259259impl < Dyn : ?Sized > Ord for DynMetadata < Dyn > {
260260 #[ inline]
261+ #[ allow( ambiguous_wide_pointer_comparisons) ]
261262 fn cmp ( & self , other : & Self ) -> crate :: cmp:: Ordering {
262263 ( self . vtable_ptr as * const VTable ) . cmp ( & ( other. vtable_ptr as * const VTable ) )
263264 }
Original file line number Diff line number Diff line change @@ -2275,6 +2275,7 @@ impl<T: ?Sized> Ord for *mut T {
22752275#[ stable( feature = "rust1" , since = "1.0.0" ) ]
22762276impl < T : ?Sized > PartialOrd for * mut T {
22772277 #[ inline( always) ]
2278+ #[ allow( ambiguous_wide_pointer_comparisons) ]
22782279 fn partial_cmp ( & self , other : & * mut T ) -> Option < Ordering > {
22792280 Some ( self . cmp ( other) )
22802281 }
Original file line number Diff line number Diff line change @@ -1821,6 +1821,7 @@ impl<T: ?Sized> PartialEq for NonNull<T> {
18211821#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
18221822impl < T : ?Sized > Ord for NonNull < T > {
18231823 #[ inline]
1824+ #[ allow( ambiguous_wide_pointer_comparisons) ]
18241825 fn cmp ( & self , other : & Self ) -> Ordering {
18251826 self . as_ptr ( ) . cmp ( & other. as_ptr ( ) )
18261827 }
@@ -1829,6 +1830,7 @@ impl<T: ?Sized> Ord for NonNull<T> {
18291830#[ stable( feature = "nonnull" , since = "1.25.0" ) ]
18301831impl < T : ?Sized > PartialOrd for NonNull < T > {
18311832 #[ inline]
1833+ #[ allow( ambiguous_wide_pointer_comparisons) ]
18321834 fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
18331835 self . as_ptr ( ) . partial_cmp ( & other. as_ptr ( ) )
18341836 }
You can’t perform that action at this time.
0 commit comments