1
Fork 0

Make late and late_anon regions track the bound var position

This commit is contained in:
Jack Huey 2020-11-15 17:06:58 -05:00
parent 84f82d348c
commit 666859a6f8
6 changed files with 99 additions and 54 deletions

View file

@ -39,8 +39,13 @@ impl LifetimeDefOrigin {
pub enum Region {
Static,
EarlyBound(/* index */ u32, /* lifetime decl */ DefId, LifetimeDefOrigin),
LateBound(ty::DebruijnIndex, /* lifetime decl */ DefId, LifetimeDefOrigin),
LateBoundAnon(ty::DebruijnIndex, /* anon index */ u32),
LateBound(
ty::DebruijnIndex,
/* late-bound index */ u32,
/* lifetime decl */ DefId,
LifetimeDefOrigin,
),
LateBoundAnon(ty::DebruijnIndex, /* late-bound index */ u32, /* anon index */ u32),
Free(DefId, /* lifetime decl */ DefId),
}