Skip to content

Commit ca03f2b

Browse files
committed
s/pord/partial_ord/ to fix dogfood failure
1 parent 668b747 commit ca03f2b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clippy_lints/src/derive.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl<'tcx> LateLintPass<'tcx> for Derive {
173173
let is_automatically_derived = is_automatically_derived(&*item.attrs);
174174

175175
check_hash_peq(cx, item.span, trait_ref, ty, is_automatically_derived);
176-
check_ord_pord(cx, item.span, trait_ref, ty, is_automatically_derived);
176+
check_ord_partial_ord(cx, item.span, trait_ref, ty, is_automatically_derived);
177177

178178
if is_automatically_derived {
179179
check_unsafe_derive_deserialize(cx, item, trait_ref, ty);
@@ -239,7 +239,7 @@ fn check_hash_peq<'tcx>(
239239
}
240240

241241
/// Implementation of the `DERIVE_ORD_XOR_PARTIAL_ORD` lint.
242-
fn check_ord_pord<'tcx>(
242+
fn check_ord_partial_ord<'tcx>(
243243
cx: &LateContext<'tcx>,
244244
span: Span,
245245
trait_ref: &TraitRef<'_>,
@@ -248,15 +248,15 @@ fn check_ord_pord<'tcx>(
248248
) {
249249
if_chain! {
250250
if let Some(ord_trait_def_id) = get_trait_def_id(cx, &paths::ORD);
251-
if let Some(pord_trait_def_id) = cx.tcx.lang_items().partial_ord_trait();
251+
if let Some(partial_ord_trait_def_id) = cx.tcx.lang_items().partial_ord_trait();
252252
if let Some(def_id) = &trait_ref.trait_def_id();
253253
if *def_id == ord_trait_def_id;
254254
then {
255255
// Look for the PartialOrd implementations for `ty`
256-
cx.tcx.for_each_relevant_impl(pord_trait_def_id, ty, |impl_id| {
257-
let pord_is_automatically_derived = is_automatically_derived(&cx.tcx.get_attrs(impl_id));
256+
cx.tcx.for_each_relevant_impl(partial_ord_trait_def_id, ty, |impl_id| {
257+
let partial_ord_is_automatically_derived = is_automatically_derived(&cx.tcx.get_attrs(impl_id));
258258

259-
if pord_is_automatically_derived == ord_is_automatically_derived {
259+
if partial_ord_is_automatically_derived == ord_is_automatically_derived {
260260
return;
261261
}
262262

@@ -265,7 +265,7 @@ fn check_ord_pord<'tcx>(
265265
// Only care about `impl PartialOrd<Foo> for Foo`
266266
// For `impl PartialOrd<B> for A, input_types is [A, B]
267267
if trait_ref.substs.type_at(1) == ty {
268-
let mess = if pord_is_automatically_derived {
268+
let mess = if partial_ord_is_automatically_derived {
269269
"you are implementing `Ord` explicitly but have derived `PartialOrd`"
270270
} else {
271271
"you are deriving `Ord` but have implemented `PartialOrd` explicitly"

0 commit comments

Comments
 (0)