Add Lifetime to DynTy
This commit is contained in:
parent
96756f1b1d
commit
9da191c7e0
@ -200,7 +200,8 @@ impl<'a> TyLoweringContext<'a> {
|
||||
)
|
||||
});
|
||||
let bounds = crate::make_only_type_binders(1, bounds);
|
||||
TyKind::Dyn(DynTy { bounds }).intern(&Interner)
|
||||
TyKind::Dyn(DynTy { bounds, lifetime: LifetimeData::Static.intern(&Interner) })
|
||||
.intern(&Interner)
|
||||
}
|
||||
TypeRef::ImplTrait(bounds) => {
|
||||
match self.impl_trait_mode {
|
||||
@ -392,6 +393,7 @@ impl<'a> TyLoweringContext<'a> {
|
||||
))),
|
||||
),
|
||||
),
|
||||
lifetime: LifetimeData::Static.intern(&Interner),
|
||||
};
|
||||
TyKind::Dyn(dyn_ty).intern(&Interner)
|
||||
};
|
||||
|
@ -149,6 +149,7 @@ impl ToChalk for Ty {
|
||||
where_clauses.bounds.binders.clone(),
|
||||
crate::QuantifiedWhereClauses::from_iter(&Interner, bounds),
|
||||
),
|
||||
lifetime: LifetimeData::Static.intern(&Interner),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ impl ProjectionTy {
|
||||
pub struct DynTy {
|
||||
/// The unknown self type.
|
||||
pub bounds: Binders<QuantifiedWhereClauses>,
|
||||
pub lifetime: Lifetime,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user