Update term for use in more places
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the future, but slightly worried it allows items which are consts which only accept types.
This commit is contained in:
@@ -148,7 +148,7 @@ pub struct TypeBinding {
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum TypeBindingKind {
|
||||
Equality(Type),
|
||||
Equality(Term),
|
||||
Constraint(Vec<GenericBound>),
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ pub enum GenericParamDefKind {
|
||||
pub enum WherePredicate {
|
||||
BoundPredicate { ty: Type, bounds: Vec<GenericBound> },
|
||||
RegionPredicate { lifetime: String, bounds: Vec<GenericBound> },
|
||||
EqPredicate { lhs: Type, rhs: Type },
|
||||
EqPredicate { lhs: Type, rhs: Term },
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
@@ -359,6 +359,13 @@ pub enum TraitBoundModifier {
|
||||
MaybeConst,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Term {
|
||||
Type(Type),
|
||||
Constant(Constant),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[serde(tag = "kind", content = "inner")]
|
||||
|
||||
Reference in New Issue
Block a user