Skip to content

Commit 0a07dc5

Browse files
authored
typing_env_env_for_derived_eq -> typing_env_for_derived_eq (#13769)
I'm assuming the duplicated `env` was a typo. Apologies if I've made a mistake. (cc: @lcnr) --- changelog: none
2 parents 278e316 + 92badb3 commit 0a07dc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/derive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ fn check_partial_eq_without_eq<'tcx>(cx: &LateContext<'tcx>, span: Span, trait_r
453453
&& cx.tcx.is_diagnostic_item(sym::PartialEq, def_id)
454454
&& !has_non_exhaustive_attr(cx.tcx, *adt)
455455
&& !ty_implements_eq_trait(cx.tcx, ty, eq_trait_def_id)
456-
&& let typing_env = typing_env_env_for_derived_eq(cx.tcx, adt.did(), eq_trait_def_id)
456+
&& let typing_env = typing_env_for_derived_eq(cx.tcx, adt.did(), eq_trait_def_id)
457457
&& let Some(local_def_id) = adt.did().as_local()
458458
// If all of our fields implement `Eq`, we can implement `Eq` too
459459
&& adt
@@ -484,7 +484,7 @@ fn ty_implements_eq_trait<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, eq_trait_id: De
484484
}
485485

486486
/// Creates the `ParamEnv` used for the give type's derived `Eq` impl.
487-
fn typing_env_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) -> ty::TypingEnv<'_> {
487+
fn typing_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) -> ty::TypingEnv<'_> {
488488
// Initial map from generic index to param def.
489489
// Vec<(param_def, needs_eq)>
490490
let mut params = tcx

0 commit comments

Comments
 (0)