X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fty%2Ffold.rs;h=1445bc1ed32e60c604e275f948ce30722390a2b2;hb=f02439dea78e5c2df42198c7a03e2db6002ff263;hp=6b9a37d848da2966870256959d7e1d10ecb672cc;hpb=548ae602fc92b35d7a28fa9d70a7be51bc3328f9;p=rust.git diff --git a/compiler/rustc_middle/src/ty/fold.rs b/compiler/rustc_middle/src/ty/fold.rs index 6b9a37d848d..1445bc1ed32 100644 --- a/compiler/rustc_middle/src/ty/fold.rs +++ b/compiler/rustc_middle/src/ty/fold.rs @@ -610,7 +610,9 @@ fn replace_ty(&mut self, bt: ty::BoundTy) -> Ty<'tcx> { let index = entry.index(); let var = ty::BoundVar::from_usize(index); let kind = entry - .or_insert_with(|| ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon)) + .or_insert_with(|| { + ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon(index as u32)) + }) .expect_ty(); self.tcx.mk_ty(ty::Bound(ty::INNERMOST, BoundTy { var, kind })) }