Rollup merge of #109240 - compiler-errors:dont-binder-twice, r=oli-obk
Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code. Fixes #109239
This commit is contained in:
commit
66ba60a445
3 changed files with 33 additions and 30 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue