1
1
// See core/src/primitive_docs.rs for documentation.
2
2
3
3
use crate :: cmp:: Ordering :: { self , * } ;
4
- use crate :: marker:: { ConstParamTy_ , PointeeSized , StructuralPartialEq , UnsizedConstParamTy } ;
4
+ use crate :: marker:: { ConstParamTy_ , StructuralPartialEq , UnsizedConstParamTy } ;
5
5
use crate :: ops:: ControlFlow :: { self , Break , Continue } ;
6
6
use crate :: random:: { Random , RandomSource } ;
7
7
@@ -24,10 +24,7 @@ macro_rules! tuple_impls {
24
24
maybe_tuple_doc! {
25
25
$( $T) + @
26
26
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
27
- impl <$( $T: PartialEq ) ,+> PartialEq for ( $( $T, ) +)
28
- where
29
- last_type!( $( $T, ) +) : PointeeSized
30
- {
27
+ impl <$( $T: PartialEq ) ,+> PartialEq for ( $( $T, ) +) {
31
28
#[ inline]
32
29
fn eq( & self , other: & ( $( $T, ) +) ) -> bool {
33
30
$( ${ ignore( $T) } self . ${ index( ) } == other. ${ index( ) } ) &&+
@@ -43,8 +40,6 @@ macro_rules! tuple_impls {
43
40
$( $T) + @
44
41
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
45
42
impl <$( $T: Eq ) ,+> Eq for ( $( $T, ) +)
46
- where
47
- last_type!( $( $T, ) +) : PointeeSized
48
43
{ }
49
44
}
50
45
@@ -73,8 +68,6 @@ macro_rules! tuple_impls {
73
68
$( $T) + @
74
69
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
75
70
impl <$( $T: PartialOrd ) ,+> PartialOrd for ( $( $T, ) +)
76
- where
77
- last_type!( $( $T, ) +) : PointeeSized
78
71
{
79
72
#[ inline]
80
73
fn partial_cmp( & self , other: & ( $( $T, ) +) ) -> Option <Ordering > {
@@ -119,8 +112,6 @@ macro_rules! tuple_impls {
119
112
$( $T) + @
120
113
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
121
114
impl <$( $T: Ord ) ,+> Ord for ( $( $T, ) +)
122
- where
123
- last_type!( $( $T, ) +) : PointeeSized
124
115
{
125
116
#[ inline]
126
117
fn cmp( & self , other: & ( $( $T, ) +) ) -> Ordering {
@@ -245,9 +236,4 @@ macro_rules! lexical_cmp {
245
236
( $a: expr, $b: expr) => { ( $a) . cmp( & $b) } ;
246
237
}
247
238
248
- macro_rules! last_type {
249
- ( $a: ident, ) => { $a } ;
250
- ( $a: ident, $( $rest_a: ident, ) +) => { last_type!( $( $rest_a, ) +) } ;
251
- }
252
-
253
239
tuple_impls ! ( E D C B A Z Y X W V U T ) ;
0 commit comments