File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ use self::Ordering::*;
224
224
append_const_msg
225
225
) ]
226
226
#[ rustc_diagnostic_item = "PartialEq" ]
227
+ #[ cfg_attr( not( bootstrap) , const_trait) ]
227
228
pub trait PartialEq < Rhs : ?Sized = Self > {
228
229
/// This method tests for `self` and `other` values to be equal, and is used
229
230
/// by `==`.
@@ -1414,12 +1415,23 @@ mod impls {
1414
1415
macro_rules! partial_eq_impl {
1415
1416
( $( $t: ty) * ) => ( $(
1416
1417
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1418
+ #[ cfg( bootstrap) ]
1417
1419
impl PartialEq for $t {
1418
1420
#[ inline]
1419
1421
fn eq( & self , other: & $t) -> bool { ( * self ) == ( * other) }
1420
1422
#[ inline]
1421
1423
fn ne( & self , other: & $t) -> bool { ( * self ) != ( * other) }
1422
1424
}
1425
+
1426
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1427
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
1428
+ #[ cfg( not( bootstrap) ) ]
1429
+ impl const PartialEq for $t {
1430
+ #[ inline]
1431
+ fn eq( & self , other: & $t) -> bool { ( * self ) == ( * other) }
1432
+ #[ inline]
1433
+ fn ne( & self , other: & $t) -> bool { ( * self ) != ( * other) }
1434
+ }
1423
1435
) * )
1424
1436
}
1425
1437
You can’t perform that action at this time.
0 commit comments