Fix: Generics decl constraints

This commit is contained in:
2026-05-17 19:30:20 +02:00
parent 1d4473906f
commit 907d9d7f9d
4 changed files with 20 additions and 10 deletions
+11
View File
@@ -41,3 +41,14 @@ impl TypeExpr {
Self(kind, Vec::new())
}
}
impl From<GenericDecl> for Generic {
fn from(value: GenericDecl) -> Self {
match value {
GenericDecl::Lifetime(life) => Generic::Lifetime(life),
GenericDecl::Type(ty, _) => {
Generic::Type(TypeExpr(TypeExprKind::Path(Path(vec![ty])), Vec::new()))
}
}
}
}