@@ -9,7 +9,7 @@ use std::path::PathBuf;
99use serde:: { Deserialize , Serialize } ;
1010
1111/// rustdoc format-version.
12- pub const FORMAT_VERSION : u32 = 14 ;
12+ pub const FORMAT_VERSION : u32 = 15 ;
1313
1414/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
1515/// about the language items in the local crate, as well as info about external items to allow
@@ -391,6 +391,14 @@ pub enum WherePredicate {
391391 #[ serde( rename = "type" ) ]
392392 type_ : Type ,
393393 bounds : Vec < GenericBound > ,
394+ /// Used for Higher-Rank Trait Bounds (HRTBs)
395+ /// ```plain
396+ /// where for<'a> &'a T: Iterator,"
397+ /// ^^^^^^^
398+ /// |
399+ /// this part
400+ /// ```
401+ generic_params : Vec < GenericParamDef > ,
394402 } ,
395403 RegionPredicate {
396404 lifetime : String ,
@@ -408,7 +416,13 @@ pub enum GenericBound {
408416 TraitBound {
409417 #[ serde( rename = "trait" ) ]
410418 trait_ : Type ,
411- /// Used for HRTBs
419+ /// Used for Higher-Rank Trait Bounds (HRTBs)
420+ /// ```plain
421+ /// where F: for<'a, 'b> Fn(&'a u8, &'b u8)
422+ /// ^^^^^^^^^^^
423+ /// |
424+ /// this part
425+ /// ```
412426 generic_params : Vec < GenericParamDef > ,
413427 modifier : TraitBoundModifier ,
414428 } ,
@@ -487,6 +501,13 @@ pub enum Type {
487501#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
488502pub struct FunctionPointer {
489503 pub decl : FnDecl ,
504+ /// Used for Higher-Rank Trait Bounds (HRTBs)
505+ /// ```plain
506+ /// for<'c> fn(val: &'c i32) -> i32
507+ /// ^^^^^^^
508+ /// |
509+ /// this part
510+ /// ```
490511 pub generic_params : Vec < GenericParamDef > ,
491512 pub header : Header ,
492513}
0 commit comments