@@ -9,7 +9,7 @@ use std::path::PathBuf;
9
9
use serde:: { Deserialize , Serialize } ;
10
10
11
11
/// rustdoc format-version.
12
- pub const FORMAT_VERSION : u32 = 14 ;
12
+ pub const FORMAT_VERSION : u32 = 15 ;
13
13
14
14
/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
15
15
/// about the language items in the local crate, as well as info about external items to allow
@@ -391,6 +391,14 @@ pub enum WherePredicate {
391
391
#[ serde( rename = "type" ) ]
392
392
type_ : Type ,
393
393
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 > ,
394
402
} ,
395
403
RegionPredicate {
396
404
lifetime : String ,
@@ -408,7 +416,13 @@ pub enum GenericBound {
408
416
TraitBound {
409
417
#[ serde( rename = "trait" ) ]
410
418
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
+ /// ```
412
426
generic_params : Vec < GenericParamDef > ,
413
427
modifier : TraitBoundModifier ,
414
428
} ,
@@ -487,6 +501,13 @@ pub enum Type {
487
501
#[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
488
502
pub struct FunctionPointer {
489
503
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
+ /// ```
490
511
pub generic_params : Vec < GenericParamDef > ,
491
512
pub header : Header ,
492
513
}
0 commit comments