1
Fork 0

eagerly check whether we replace any bound vars

This commit is contained in:
lcnr 2022-06-08 18:45:49 +02:00
parent e61807c6bf
commit 3d26f5a000
3 changed files with 16 additions and 25 deletions

View file

@ -1526,8 +1526,12 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
value: ty::Binder<'tcx, T>,
) -> T
where
T: TypeFoldable<'tcx>,
T: TypeFoldable<'tcx> + Copy,
{
if let Some(inner) = value.no_bound_vars() {
return inner;
}
let mut region_map = BTreeMap::new();
let fld_r = |br: ty::BoundRegion| {
*region_map