Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7be8693

Browse files
committedJan 16, 2022
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: <#92805 (comment)> r? `@lcnr`
2 parents 42852d7 + 3f3a10f commit 7be8693

File tree

123 files changed

+405
-886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+405
-886
lines changed
 

‎compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
171171
for (local, location) in drop_used {
172172
if !live_locals.contains(&local) {
173173
let local_ty = self.cx.body.local_decls[local].ty;
174-
if local_ty.has_free_regions(self.cx.typeck.tcx()) {
174+
if local_ty.has_free_regions() {
175175
self.cx.add_drop_live_facts_for(local, local_ty, &[location], &locations);
176176
}
177177
}

‎compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
426426
self.cx.param_env.and(type_op::ascribe_user_type::AscribeUserType::new(
427427
constant.literal.ty(),
428428
uv.def.did,
429-
UserSubsts { substs: uv.substs(self.tcx()), user_self_ty: None },
429+
UserSubsts { substs: uv.substs, user_self_ty: None },
430430
)),
431431
) {
432432
span_mirbug!(
@@ -1970,7 +1970,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
19701970
let predicates = self.prove_closure_bounds(
19711971
tcx,
19721972
def_id.expect_local(),
1973-
uv.substs(tcx),
1973+
uv.substs,
19741974
location,
19751975
);
19761976
self.normalize_and_prove_instantiated_predicates(

0 commit comments

Comments
 (0)
Please sign in to comment.