diff options
| author | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-01-18 16:52:47 -0700 |
|---|---|---|
| committer | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-01-26 20:28:25 -0700 |
| commit | c2414dfaa4a01a60ec65c44879e103c3fc3152bb (patch) | |
| tree | 4db7a192c7995a704a242df91e27a9aed1800660 /compiler/rustc_ty_utils | |
| parent | e982971ff22fa190369b5f536403c37c52b10a26 (diff) | |
| download | rust-c2414dfaa4a01a60ec65c44879e103c3fc3152bb.tar.gz rust-c2414dfaa4a01a60ec65c44879e103c3fc3152bb.zip | |
change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata
Diffstat (limited to 'compiler/rustc_ty_utils')
| -rw-r--r-- | compiler/rustc_ty_utils/src/abi.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/implied_bounds.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/ty.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index e47e68e0670..1c74aeca5ab 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -41,7 +41,7 @@ fn fn_sig_for_fn_abi<'tcx>( // We normalize the `fn_sig` again after substituting at a later point. let mut sig = match *ty.kind() { ty::FnDef(def_id, substs) => tcx - .bound_fn_sig(def_id) + .fn_sig(def_id) .map_bound(|fn_sig| { tcx.normalize_erasing_regions(tcx.param_env(def_id), fn_sig) }) diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs index 81297464eab..d308543304c 100644 --- a/compiler/rustc_ty_utils/src/implied_bounds.rs +++ b/compiler/rustc_ty_utils/src/implied_bounds.rs @@ -9,12 +9,12 @@ pub fn provide(providers: &mut ty::query::Providers) { fn assumed_wf_types(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Ty<'_>> { match tcx.def_kind(def_id) { DefKind::Fn => { - let sig = tcx.bound_fn_sig(def_id).skip_binder(); + let sig = tcx.fn_sig(def_id).skip_binder(); let liberated_sig = tcx.liberate_late_bound_regions(def_id, sig); liberated_sig.inputs_and_output } DefKind::AssocFn => { - let sig = tcx.bound_fn_sig(def_id).skip_binder(); + let sig = tcx.fn_sig(def_id).skip_binder(); let liberated_sig = tcx.liberate_late_bound_regions(def_id, sig); let mut assumed_wf_types: Vec<_> = tcx.assumed_wf_types(tcx.parent(def_id)).as_slice().into(); diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index f1a927520b4..77986ad4861 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -299,7 +299,7 @@ fn well_formed_types_in_env(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Predica // In an fn, we assume that the arguments and all their constituents are // well-formed. NodeKind::Fn => { - let fn_sig = tcx.bound_fn_sig(def_id).subst_identity(); + let fn_sig = tcx.fn_sig(def_id).subst_identity(); let fn_sig = tcx.liberate_late_bound_regions(def_id, fn_sig); inputs.extend(fn_sig.inputs().iter().flat_map(|ty| ty.walk())); |
