Skip to content

Commit e1ea346

Browse files
committed
Treat the 'static lifetime as well-formed
The static_lifetime_param test now passes
1 parent e2ad919 commit e1ea346

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/formality-prove/src/prove/prove_wf.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use formality_core::{judgment_fn, ProvenSet};
22
use formality_types::grammar::{
3-
AliasName, AliasTy, ConstData, Parameter, Parameters, RigidName, RigidTy, UniversalVar, Wcs,
3+
AliasName, AliasTy, ConstData, LtData, Parameter, Parameters, RigidName, RigidTy, UniversalVar,
4+
Wcs,
45
};
56

67
use crate::{
@@ -51,6 +52,11 @@ judgment_fn! {
5152
(prove_wf(decls, env, assumptions, RigidTy { name: RigidName::AdtId(adt_id), parameters }) => c)
5253
)
5354

55+
(
56+
--- ("static lifetime")
57+
(prove_wf(_decls, env, _assumptions, LtData::Static) => Constraints::none(env))
58+
)
59+
5460
(
5561
(prove_wf(&decls, &env, &assumptions, ty) => c)
5662
--- ("rigid constants")

0 commit comments

Comments
 (0)