Skip to content

Commit d8b2f93

Browse files
Rip out old effects var handling code from traits
1 parent 91a458f commit d8b2f93

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

clippy_lints/src/implied_bounds_in_impls.rs

-9
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,6 @@ fn is_same_generics<'tcx>(
190190
.enumerate()
191191
.skip(1) // skip `Self` implicit arg
192192
.all(|(arg_index, arg)| {
193-
if [
194-
implied_by_generics.host_effect_index,
195-
implied_generics.host_effect_index,
196-
]
197-
.contains(&Some(arg_index))
198-
{
199-
// skip host effect params in determining whether generics are same
200-
return true;
201-
}
202193
if let Some(ty) = arg.as_type() {
203194
if let &ty::Param(ty::ParamTy { index, .. }) = ty.kind()
204195
// `index == 0` means that it's referring to `Self`,

clippy_utils/src/ty.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -274,23 +274,10 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
274274
.map(|arg| arg.into().unwrap_or_else(|| infcx.next_ty_var(DUMMY_SP).into()))
275275
.collect::<Vec<_>>();
276276

277-
// If an effect arg was not specified, we need to specify it.
278-
let effect_arg = if tcx
279-
.generics_of(trait_id)
280-
.host_effect_index
281-
.is_some_and(|x| args.get(x - 1).is_none())
282-
{
283-
Some(GenericArg::from(callee_id.map_or(tcx.consts.true_, |def_id| {
284-
tcx.expected_host_effect_param_for_body(def_id)
285-
})))
286-
} else {
287-
None
288-
};
289-
290277
let trait_ref = TraitRef::new(
291278
tcx,
292279
trait_id,
293-
[GenericArg::from(ty)].into_iter().chain(args).chain(effect_arg),
280+
[GenericArg::from(ty)].into_iter().chain(args),
294281
);
295282

296283
debug_assert_matches!(

0 commit comments

Comments
 (0)