@@ -247,6 +247,8 @@ use crate::ops::ControlFlow;
247
247
append_const_msg
248
248
) ]
249
249
#[ rustc_diagnostic_item = "PartialEq" ]
250
+ #[ const_trait]
251
+ #[ rustc_const_unstable( feature = "const_trait_impl" , issue = "67792" ) ]
250
252
pub trait PartialEq < Rhs : PointeeSized = Self > : PointeeSized {
251
253
/// Tests for `self` and `other` values to be equal, and is used by `==`.
252
254
#[ must_use]
@@ -1811,7 +1813,8 @@ mod impls {
1811
1813
macro_rules! partial_eq_impl {
1812
1814
( $( $t: ty) * ) => ( $(
1813
1815
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1814
- impl PartialEq for $t {
1816
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
1817
+ impl const PartialEq for $t {
1815
1818
#[ inline]
1816
1819
fn eq( & self , other: & Self ) -> bool { * self == * other }
1817
1820
#[ inline]
@@ -2018,9 +2021,10 @@ mod impls {
2018
2021
// & pointers
2019
2022
2020
2023
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2021
- impl < A : PointeeSized , B : PointeeSized > PartialEq < & B > for & A
2024
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
2025
+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & B > for & A
2022
2026
where
2023
- A : PartialEq < B > ,
2027
+ A : ~ const PartialEq < B > ,
2024
2028
{
2025
2029
#[ inline]
2026
2030
fn eq ( & self , other : & & B ) -> bool {
@@ -2089,9 +2093,10 @@ mod impls {
2089
2093
// &mut pointers
2090
2094
2091
2095
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2092
- impl < A : PointeeSized , B : PointeeSized > PartialEq < & mut B > for & mut A
2096
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
2097
+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & mut B > for & mut A
2093
2098
where
2094
- A : PartialEq < B > ,
2099
+ A : ~ const PartialEq < B > ,
2095
2100
{
2096
2101
#[ inline]
2097
2102
fn eq ( & self , other : & & mut B ) -> bool {
@@ -2158,9 +2163,10 @@ mod impls {
2158
2163
impl < A : PointeeSized > Eq for & mut A where A : Eq { }
2159
2164
2160
2165
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2161
- impl < A : PointeeSized , B : PointeeSized > PartialEq < & mut B > for & A
2166
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
2167
+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & mut B > for & A
2162
2168
where
2163
- A : PartialEq < B > ,
2169
+ A : ~ const PartialEq < B > ,
2164
2170
{
2165
2171
#[ inline]
2166
2172
fn eq ( & self , other : & & mut B ) -> bool {
@@ -2173,9 +2179,10 @@ mod impls {
2173
2179
}
2174
2180
2175
2181
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2176
- impl < A : PointeeSized , B : PointeeSized > PartialEq < & B > for & mut A
2182
+ #[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
2183
+ impl < A : PointeeSized , B : PointeeSized > const PartialEq < & B > for & mut A
2177
2184
where
2178
- A : PartialEq < B > ,
2185
+ A : ~ const PartialEq < B > ,
2179
2186
{
2180
2187
#[ inline]
2181
2188
fn eq ( & self , other : & & B ) -> bool {
0 commit comments