diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-11 22:35:29 +0100 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-14 13:27:35 +0100 |
| commit | e55583c4b831c601452117a8eb20af59779ef582 (patch) | |
| tree | 575ada099c48a205145b0d39816fee6b05e8bad6 /compiler/rustc_ty_utils/src/implied_bounds.rs | |
| parent | df5c2cf9bc60fa935aef31a217d9fa0a328d7fe2 (diff) | |
| download | rust-e55583c4b831c601452117a8eb20af59779ef582.tar.gz rust-e55583c4b831c601452117a8eb20af59779ef582.zip | |
refactor(rustc_middle): Substs -> GenericArg
Diffstat (limited to 'compiler/rustc_ty_utils/src/implied_bounds.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/implied_bounds.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs index 2822595a8a7..be063a097c0 100644 --- a/compiler/rustc_ty_utils/src/implied_bounds.rs +++ b/compiler/rustc_ty_utils/src/implied_bounds.rs @@ -13,7 +13,7 @@ pub fn provide(providers: &mut Providers) { fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<'tcx>, Span)] { match tcx.def_kind(def_id) { DefKind::Fn => { - let sig = tcx.fn_sig(def_id).subst_identity(); + let sig = tcx.fn_sig(def_id).instantiate_identity(); let liberated_sig = tcx.liberate_late_bound_regions(def_id.to_def_id(), sig); tcx.arena.alloc_from_iter(itertools::zip_eq( liberated_sig.inputs_and_output, @@ -21,7 +21,7 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<' )) } DefKind::AssocFn => { - let sig = tcx.fn_sig(def_id).subst_identity(); + let sig = tcx.fn_sig(def_id).instantiate_identity(); let liberated_sig = tcx.liberate_late_bound_regions(def_id.to_def_id(), sig); let mut assumed_wf_types: Vec<_> = tcx.assumed_wf_types(tcx.local_parent(def_id)).into(); @@ -35,8 +35,8 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<' // Trait arguments and the self type for trait impls or only the self type for // inherent impls. let tys = match tcx.impl_trait_ref(def_id) { - Some(trait_ref) => trait_ref.skip_binder().substs.types().collect(), - None => vec![tcx.type_of(def_id).subst_identity()], + Some(trait_ref) => trait_ref.skip_binder().args.types().collect(), + None => vec![tcx.type_of(def_id).instantiate_identity()], }; let mut impl_spans = impl_spans(tcx, def_id); |
