make (try_)subst_and_normalize_erasing_regions take EarlyBinder

This commit is contained in:
Kyle Matsuda 2023-02-20 12:46:39 -07:00
parent 0b7acaa291
commit 39db64e0ab

View file

@ -435,7 +435,7 @@ fn can_change_type<'a>(cx: &LateContext<'a>, mut expr: &'a Expr<'a>, mut ty: Ty<
let output_ty = fn_sig.output();
if output_ty.contains(*param_ty) {
if let Ok(new_ty) = cx.tcx.try_subst_and_normalize_erasing_regions(
new_subst, cx.param_env, output_ty) {
new_subst, cx.param_env, EarlyBinder(output_ty)) {
expr = parent_expr;
ty = new_ty;
continue;