Replace static_lifetime usages with error_lifetime, lower outlives goals

This commit is contained in:
Lukas Wirth 2024-04-02 14:03:49 +02:00
parent 3691380c35
commit 0927f86247
15 changed files with 139 additions and 98 deletions

View file

@ -23,6 +23,7 @@ use crate::{
autoderef::{builtin_deref, deref_by_trait, Autoderef},
consteval,
db::{InternedClosure, InternedCoroutine},
error_lifetime,
infer::{
coerce::{CoerceMany, CoercionCause},
find_continuable,
@ -630,7 +631,7 @@ impl InferenceContext<'_> {
let inner_ty = self.infer_expr_inner(*expr, &expectation);
match rawness {
Rawness::RawPtr => TyKind::Raw(mutability, inner_ty),
Rawness::Ref => TyKind::Ref(mutability, static_lifetime(), inner_ty),
Rawness::Ref => TyKind::Ref(mutability, error_lifetime(), inner_ty),
}
.intern(Interner)
}