use serde::{Deserialize, Serialize};
+/// rustdoc format-version.
+pub const FORMAT_VERSION: u32 = 10;
+
/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
/// about the language items in the local crate, as well as info about external items to allow
/// tools to find or link to them.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum TypeBindingKind {
- Equality(Type),
+ Equality(Term),
Constraint(Vec<GenericBound>),
}
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)]
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")]
pub expr: String,
}
-/// rustdoc format-version.
-pub const FORMAT_VERSION: u32 = 9;
-
#[cfg(test)]
mod tests;