Add with_opt_const_effect_param helper, simplify

This commit is contained in:
Michael Goulet 2023-11-28 21:17:55 +00:00
parent 89c2c85fe1
commit d3404d2b98
7 changed files with 37 additions and 30 deletions

View file

@ -344,9 +344,9 @@ trait PartialEq<Rhs: ?Sized = Self> {
}
}
impl<A: ?Sized, B: ?Sized> PartialEq<&B> for &A
impl<A: ?Sized, B: ?Sized> const PartialEq<&B> for &A
where
A: PartialEq<B>,
A: ~const PartialEq<B>,
{
fn eq(&self, other: &&B) -> bool {
PartialEq::eq(*self, *other)