@@ -8,6 +8,9 @@ use std::path::PathBuf;
8
8
9
9
use serde:: { Deserialize , Serialize } ;
10
10
11
+ /// rustdoc format-version.
12
+ pub const FORMAT_VERSION : u32 = 10 ;
13
+
11
14
/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
12
15
/// about the language items in the local crate, as well as info about external items to allow
13
16
/// tools to find or link to them.
@@ -148,7 +151,7 @@ pub struct TypeBinding {
148
151
#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
149
152
#[ serde( rename_all = "snake_case" ) ]
150
153
pub enum TypeBindingKind {
151
- Equality ( Type ) ,
154
+ Equality ( Term ) ,
152
155
Constraint ( Vec < GenericBound > ) ,
153
156
}
154
157
@@ -335,7 +338,7 @@ pub enum GenericParamDefKind {
335
338
pub enum WherePredicate {
336
339
BoundPredicate { ty : Type , bounds : Vec < GenericBound > } ,
337
340
RegionPredicate { lifetime : String , bounds : Vec < GenericBound > } ,
338
- EqPredicate { lhs : Type , rhs : Type } ,
341
+ EqPredicate { lhs : Type , rhs : Term } ,
339
342
}
340
343
341
344
#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
@@ -359,6 +362,13 @@ pub enum TraitBoundModifier {
359
362
MaybeConst ,
360
363
}
361
364
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
+
362
372
#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
363
373
#[ serde( rename_all = "snake_case" ) ]
364
374
#[ serde( tag = "kind" , content = "inner" ) ]
@@ -510,8 +520,5 @@ pub struct Static {
510
520
pub expr : String ,
511
521
}
512
522
513
- /// rustdoc format-version.
514
- pub const FORMAT_VERSION : u32 = 9 ;
515
-
516
523
#[ cfg( test) ]
517
524
mod tests;
0 commit comments