It isn't possible to compare primitives with references of the same type #77374
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
There are implementations of arithmetic operators like
Add
,Sub
orDiv
for owned primitives mixed with references, however, comparison operators are only available for a singleT
.Is there a technical decision preventing, e.g.,
impl PartialEq<&usize> for usize
? It would be nice to be able to write10i32 > some_i32_ref_var
instead of10i32 > *some_i32_ref_var
.The text was updated successfully, but these errors were encountered: