Auto merge of #92805 - BoxyUwU:revert-lazy-anon-const-substs, r=lcnr
partially revertish `lazily "compute" anon const default substs` reverts #87280 except for some of the changes around `ty::Unevaluated` having a visitor and a generic for promoted why revert: <https://github.com/rust-lang/rust/pull/92805#issuecomment-1010736049> r? `@lcnr`
This commit is contained in:
commit
7be8693984
123 changed files with 405 additions and 886 deletions
|
@ -171,7 +171,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
|
|||
for (local, location) in drop_used {
|
||||
if !live_locals.contains(&local) {
|
||||
let local_ty = self.cx.body.local_decls[local].ty;
|
||||
if local_ty.has_free_regions(self.cx.typeck.tcx()) {
|
||||
if local_ty.has_free_regions() {
|
||||
self.cx.add_drop_live_facts_for(local, local_ty, &[location], &locations);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
|
|||
self.cx.param_env.and(type_op::ascribe_user_type::AscribeUserType::new(
|
||||
constant.literal.ty(),
|
||||
uv.def.did,
|
||||
UserSubsts { substs: uv.substs(self.tcx()), user_self_ty: None },
|
||||
UserSubsts { substs: uv.substs, user_self_ty: None },
|
||||
)),
|
||||
) {
|
||||
span_mirbug!(
|
||||
|
@ -1970,7 +1970,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
let predicates = self.prove_closure_bounds(
|
||||
tcx,
|
||||
def_id.expect_local(),
|
||||
uv.substs(tcx),
|
||||
uv.substs,
|
||||
location,
|
||||
);
|
||||
self.normalize_and_prove_instantiated_predicates(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue