summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/ty/fold.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_middle/src/ty/fold.rs')
-rw-r--r--compiler/rustc_middle/src/ty/fold.rs23
1 files changed, 3 insertions, 20 deletions
diff --git a/compiler/rustc_middle/src/ty/fold.rs b/compiler/rustc_middle/src/ty/fold.rs
index d66f436f9..203e16bea 100644
--- a/compiler/rustc_middle/src/ty/fold.rs
+++ b/compiler/rustc_middle/src/ty/fold.rs
@@ -51,9 +51,7 @@ where
// Region folder
impl<'tcx> TyCtxt<'tcx> {
- /// Folds the escaping and free regions in `value` using `f`, and
- /// sets `skipped_regions` to true if any late-bound region was found
- /// and skipped.
+ /// Folds the escaping and free regions in `value` using `f`.
pub fn fold_regions<T>(
self,
value: T,
@@ -64,17 +62,6 @@ impl<'tcx> TyCtxt<'tcx> {
{
value.fold_with(&mut RegionFolder::new(self, &mut f))
}
-
- pub fn super_fold_regions<T>(
- self,
- value: T,
- mut f: impl FnMut(ty::Region<'tcx>, ty::DebruijnIndex) -> ty::Region<'tcx>,
- ) -> T
- where
- T: TypeSuperFoldable<TyCtxt<'tcx>>,
- {
- value.super_fold_with(&mut RegionFolder::new(self, &mut f))
- }
}
/// Folds over the substructure of a type, visiting its component
@@ -392,9 +379,7 @@ impl<'tcx> TyCtxt<'tcx> {
let index = entry.index();
let var = ty::BoundVar::from_usize(index);
let kind = entry
- .or_insert_with(|| {
- ty::BoundVariableKind::Region(ty::BrAnon(index as u32, None))
- })
+ .or_insert_with(|| ty::BoundVariableKind::Region(ty::BrAnon(None)))
.expect_region();
let br = ty::BoundRegion { var, kind };
self.tcx.mk_re_late_bound(ty::INNERMOST, br)
@@ -404,9 +389,7 @@ impl<'tcx> TyCtxt<'tcx> {
let index = entry.index();
let var = ty::BoundVar::from_usize(index);
let kind = entry
- .or_insert_with(|| {
- ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon(index as u32))
- })
+ .or_insert_with(|| ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon))
.expect_ty();
self.tcx.mk_bound(ty::INNERMOST, BoundTy { var, kind })
}