Fire clippy::op_ref on PartialOrd but !Ord types

This commit is contained in:
Christopher Durham 2019-12-02 20:01:50 -05:00 committed by flip1995
parent f6a75f17f6
commit 718558064d
No known key found for this signature in database
GPG key ID: 693086869D506637

View file

@ -77,7 +77,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
BinOpKind::Shr => (cx.tcx.lang_items().shr_trait(), false),
BinOpKind::Ne | BinOpKind::Eq => (cx.tcx.lang_items().eq_trait(), true),
BinOpKind::Lt | BinOpKind::Le | BinOpKind::Ge | BinOpKind::Gt => {
(cx.tcx.lang_items().ord_trait(), true)
(cx.tcx.lang_items().partial_ord_trait(), true)
},
};
if let Some(trait_id) = trait_id {