diff options
| author | lcnr <rust@lcnr.de> | 2024-11-27 18:37:39 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-11-28 10:40:58 +0100 |
| commit | 9fe7750bcd51f54b8ef171c3323b2acc54679533 (patch) | |
| tree | cedf6395d287e6c881797059ebb0a89e4c0b6902 /compiler/rustc_ty_utils/src/implied_bounds.rs | |
| parent | f005c7437def424a1c43cbc380352a58d8ac920b (diff) | |
| download | rust-9fe7750bcd51f54b8ef171c3323b2acc54679533.tar.gz rust-9fe7750bcd51f54b8ef171c3323b2acc54679533.zip | |
uplift fold_regions to rustc_type_ir
Diffstat (limited to 'compiler/rustc_ty_utils/src/implied_bounds.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/implied_bounds.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs index 5cd10e90538..c4637f1293c 100644 --- a/compiler/rustc_ty_utils/src/implied_bounds.rs +++ b/compiler/rustc_ty_utils/src/implied_bounds.rs @@ -6,6 +6,7 @@ use rustc_hir::def::DefKind; use rustc_hir::def_id::LocalDefId; use rustc_middle::bug; use rustc_middle::query::Providers; +use rustc_middle::ty::fold::fold_regions; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_span::Span; @@ -86,7 +87,8 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<' } } // FIXME: This could use a real folder, I guess. - let remapped_wf_tys = tcx.fold_regions( + let remapped_wf_tys = fold_regions( + tcx, tcx.assumed_wf_types(fn_def_id.expect_local()).to_vec(), |region, _| { // If `region` is a `ReLateParam` that is captured by the |
