diff options
| author | bors <bors@rust-lang.org> | 2023-09-26 21:32:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-26 21:32:44 +0000 |
| commit | 5ae769f06bbe2afc50cde219757a5915e61ba365 (patch) | |
| tree | 240c5a7066284368fa3242e7896e128fe76a300d /src | |
| parent | 5899a80ae60ec0959dcd4a7eca6eb02ce2866632 (diff) | |
| parent | 3c52a3e280a5fd1e8e4b48a5ec349aa00dcd859c (diff) | |
| download | rust-5ae769f06bbe2afc50cde219757a5915e61ba365.tar.gz rust-5ae769f06bbe2afc50cde219757a5915e61ba365.zip | |
Auto merge of #116144 - lcnr:subst-less, r=oli-obk
subst -> instantiate continues #110793, there are still quite a few uses of `subst` and `substitute`, but changing them all in the same PR was a bit too much, so I've stopped here for now.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs index 5c5ee262052..50d6f3b7e55 100644 --- a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs +++ b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs @@ -401,7 +401,7 @@ fn can_change_type<'a>(cx: &LateContext<'a>, mut expr: &'a Expr<'a>, mut ty: Ty< = get_callee_generic_args_and_args(cx, parent_expr) { // FIXME: the `instantiate_identity()` below seems incorrect, since we eventually - // call `tcx.try_subst_and_normalize_erasing_regions` further down + // call `tcx.try_instantiate_and_normalize_erasing_regions` further down // (i.e., we are explicitly not in the identity context). let fn_sig = cx.tcx.fn_sig(callee_def_id).instantiate_identity().skip_binder(); if let Some(arg_index) = recv.into_iter().chain(call_args).position(|arg| arg.hir_id == expr.hir_id) @@ -452,7 +452,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( + if let Ok(new_ty) = cx.tcx.try_instantiate_and_normalize_erasing_regions( new_subst, cx.param_env, EarlyBinder::bind(output_ty)) { expr = parent_expr; ty = new_ty; |
