Make NonZero const PartialEq

This commit is contained in:
Oli Scherer 2025-07-11 10:34:29 +00:00
parent 2f5722cf1b
commit 9d29583355

View File

@ -200,9 +200,10 @@ impl<T> UseCloned for NonZero<T> where T: ZeroablePrimitive {}
impl<T> Copy for NonZero<T> where T: ZeroablePrimitive {}
#[stable(feature = "nonzero", since = "1.28.0")]
impl<T> PartialEq for NonZero<T>
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
impl<T> const PartialEq for NonZero<T>
where
T: ZeroablePrimitive + PartialEq,
T: ZeroablePrimitive + ~const PartialEq,
{
#[inline]
fn eq(&self, other: &Self) -> bool {