Restore note for PartialOrd and PartialEq
This commit is contained in:
parent
3bd46f1aec
commit
27810e246c
|
@ -375,6 +375,22 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
(format!("no implementation for `{} >> {}", lhs_ty, rhs_ty),
|
(format!("no implementation for `{} >> {}", lhs_ty, rhs_ty),
|
||||||
Some("std::ops::Shr"))
|
Some("std::ops::Shr"))
|
||||||
},
|
},
|
||||||
|
hir::BinOpKind::Eq |
|
||||||
|
hir::BinOpKind::Ne => {
|
||||||
|
(format!(
|
||||||
|
"binary operation `{}` cannot be applied to type `{}`",
|
||||||
|
op.node.as_str(), lhs_ty),
|
||||||
|
Some("std::cmp::PartialEq"))
|
||||||
|
},
|
||||||
|
hir::BinOpKind::Lt |
|
||||||
|
hir::BinOpKind::Le |
|
||||||
|
hir::BinOpKind::Gt |
|
||||||
|
hir::BinOpKind::Ge => {
|
||||||
|
(format!(
|
||||||
|
"binary operation `{}` cannot be applied to type `{}`",
|
||||||
|
op.node.as_str(), lhs_ty),
|
||||||
|
Some("std::cmp::PartialOrd"))
|
||||||
|
}
|
||||||
_ => (format!(
|
_ => (format!(
|
||||||
"binary operation `{}` cannot be applied to type `{}`",
|
"binary operation `{}` cannot be applied to type `{}`",
|
||||||
op.node.as_str(), lhs_ty),
|
op.node.as_str(), lhs_ty),
|
||||||
|
|
Loading…
Reference in New Issue