replace static_lifetime with new_lifetime_var where necessary

implemented suggested fixes and changes and fix merge conflicts
This commit is contained in:
dfireBird 2024-03-18 15:48:59 +05:30
parent a555e95c9a
commit 13301e7a1a
No known key found for this signature in database
GPG key ID: 26D522CA5FC2B93D
5 changed files with 19 additions and 23 deletions

View file

@ -1873,8 +1873,9 @@ impl InferenceContext<'_> {
GenericParamId::ConstParamId(id) => {
substs.push(self.table.new_const_var(self.db.const_param_ty(id)).cast(Interner))
}
// FIXME: create `new_lifetime_var` in infer
GenericParamId::LifetimeParamId(_) => substs.push(static_lifetime().cast(Interner)),
GenericParamId::LifetimeParamId(_) => {
substs.push(self.table.new_lifetime_var().cast(Interner))
}
}
}
assert_eq!(substs.len(), total_len);