1
Fork 0

Auto merge of #99730 - lcnr:bound-vars-anon, r=jackh726

anonymize all bound vars, not just regions

fixes #98702

r? types
This commit is contained in:
bors 2022-07-29 21:38:36 +00:00
commit 211637d080
10 changed files with 260 additions and 138 deletions

View file

@ -318,8 +318,8 @@ impl<'tcx> TypeRelation<'tcx> for SimpleEqRelation<'tcx> {
// Anonymizing the LBRs is necessary to solve (Issue #59497).
// After we do so, it should be totally fine to skip the binders.
let anon_a = self.tcx.anonymize_late_bound_regions(a);
let anon_b = self.tcx.anonymize_late_bound_regions(b);
let anon_a = self.tcx.anonymize_bound_vars(a);
let anon_b = self.tcx.anonymize_bound_vars(b);
self.relate(anon_a.skip_binder(), anon_b.skip_binder())?;
Ok(a)