correctly recurse when expanding anon consts

This commit is contained in:
Boxy
2023-05-02 18:42:45 +01:00
parent 9d795a6e6e
commit 4d0887e1a2
2 changed files with 15 additions and 12 deletions

View File

@@ -63,7 +63,8 @@ impl<'tcx> TyCtxt<'tcx> {
Err(e) => self.tcx.const_error_with_guaranteed(c.ty(), e),
Ok(Some(bac)) => {
let substs = self.tcx.erase_regions(uv.substs);
bac.subst(self.tcx, substs)
let bac = bac.subst(self.tcx, substs);
return bac.fold_with(self);
}
Ok(None) => c,
},