From 39db64e0ab60dfaa5e510075d5bd6ea8362e6cf2 Mon Sep 17 00:00:00 2001 From: Kyle Matsuda Date: Mon, 20 Feb 2023 12:46:39 -0700 Subject: [PATCH] make (try_)subst_and_normalize_erasing_regions take EarlyBinder --- clippy_lints/src/methods/unnecessary_to_owned.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/methods/unnecessary_to_owned.rs b/clippy_lints/src/methods/unnecessary_to_owned.rs index 4c4c003ca46..87641c686dc 100644 --- a/clippy_lints/src/methods/unnecessary_to_owned.rs +++ b/clippy_lints/src/methods/unnecessary_to_owned.rs @@ -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;