@@ -8,6 +8,9 @@ use std::path::PathBuf;
88
99use serde:: { Deserialize , Serialize } ;
1010
11+ /// rustdoc format-version.
12+ pub const FORMAT_VERSION : u32 = 10 ;
13+
1114/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
1215/// about the language items in the local crate, as well as info about external items to allow
1316/// tools to find or link to them.
@@ -148,7 +151,7 @@ pub struct TypeBinding {
148151#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
149152#[ serde( rename_all = "snake_case" ) ]
150153pub enum TypeBindingKind {
151- Equality ( Type ) ,
154+ Equality ( Term ) ,
152155 Constraint ( Vec < GenericBound > ) ,
153156}
154157
@@ -335,7 +338,7 @@ pub enum GenericParamDefKind {
335338pub enum WherePredicate {
336339 BoundPredicate { ty : Type , bounds : Vec < GenericBound > } ,
337340 RegionPredicate { lifetime : String , bounds : Vec < GenericBound > } ,
338- EqPredicate { lhs : Type , rhs : Type } ,
341+ EqPredicate { lhs : Type , rhs : Term } ,
339342}
340343
341344#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
@@ -359,6 +362,13 @@ pub enum TraitBoundModifier {
359362 MaybeConst ,
360363}
361364
365+ #[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
366+ #[ serde( rename_all = "snake_case" ) ]
367+ pub enum Term {
368+ Type ( Type ) ,
369+ Constant ( Constant ) ,
370+ }
371+
362372#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
363373#[ serde( rename_all = "snake_case" ) ]
364374#[ serde( tag = "kind" , content = "inner" ) ]
@@ -510,8 +520,5 @@ pub struct Static {
510520 pub expr : String ,
511521}
512522
513- /// rustdoc format-version.
514- pub const FORMAT_VERSION : u32 = 9 ;
515-
516523#[ cfg( test) ]
517524mod tests;
0 commit comments