diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-18 16:17:18 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-18 17:35:26 +0000 |
| commit | 93b31d9b21f5a7066cba65ecbf85f2ef16dec891 (patch) | |
| tree | 94c6676930328bffb770b7534629f61ac121cd9a /compiler/rustc_ty_utils/src | |
| parent | 75530e9f72a1990ed2305e16fd51d02f47048f12 (diff) | |
| download | rust-93b31d9b21f5a7066cba65ecbf85f2ef16dec891.tar.gz rust-93b31d9b21f5a7066cba65ecbf85f2ef16dec891.zip | |
Remove existing AFIDT implementation
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/abi.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index a726ebae6fe..48d5a4a0fcb 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -55,31 +55,6 @@ fn fn_sig_for_fn_abi<'tcx>( sig.inputs_and_output = tcx.mk_type_list(&inputs_and_output); } - // Modify `fn() -> impl Future` to `fn() -> dyn* Future`. - if let ty::InstanceKind::ReifyShim(def_id, _) = instance.def - && let Some((rpitit_def_id, fn_args)) = - tcx.return_position_impl_trait_in_trait_shim_data(def_id) - { - let fn_args = fn_args.instantiate(tcx, args); - let rpitit_args = - fn_args.extend_to(tcx, rpitit_def_id, |param, _| match param.kind { - ty::GenericParamDefKind::Lifetime => tcx.lifetimes.re_erased.into(), - ty::GenericParamDefKind::Type { .. } - | ty::GenericParamDefKind::Const { .. } => { - unreachable!("rpitit should have no addition ty/ct") - } - }); - let dyn_star_ty = Ty::new_dynamic( - tcx, - tcx.item_bounds_to_existential_predicates(rpitit_def_id, rpitit_args), - tcx.lifetimes.re_erased, - ty::DynStar, - ); - let mut inputs_and_output = sig.inputs_and_output.to_vec(); - *inputs_and_output.last_mut().unwrap() = dyn_star_ty; - sig.inputs_and_output = tcx.mk_type_list(&inputs_and_output); - } - sig } ty::Closure(def_id, args) => { |
