Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/lower.rs')
-rw-r--r--crates/hir-ty/src/lower.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/hir-ty/src/lower.rs b/crates/hir-ty/src/lower.rs
index f1315f6c81..04ace38202 100644
--- a/crates/hir-ty/src/lower.rs
+++ b/crates/hir-ty/src/lower.rs
@@ -1311,11 +1311,10 @@ impl<'a> TyLoweringContext<'a> {
bounds,
lifetime: match lifetime {
Some(it) => match it.bound_var(Interner) {
- Some(bound_var) => LifetimeData::BoundVar(BoundVar::new(
- DebruijnIndex::INNERMOST,
- bound_var.index,
- ))
- .intern(Interner),
+ Some(bound_var) => bound_var
+ .shifted_out_to(DebruijnIndex::new(2))
+ .map(|bound_var| LifetimeData::BoundVar(bound_var).intern(Interner))
+ .unwrap_or(it),
None => it,
},
None => static_lifetime(),