File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -350,10 +350,16 @@ impl FromWithTcx<clean::WherePredicate> for WherePredicate {
350
350
fn from_tcx ( predicate : clean:: WherePredicate , tcx : TyCtxt < ' _ > ) -> Self {
351
351
use clean:: WherePredicate :: * ;
352
352
match predicate {
353
- BoundPredicate { ty, bounds, .. } => WherePredicate :: BoundPredicate {
353
+ BoundPredicate { ty, bounds, bound_params } => WherePredicate :: BoundPredicate {
354
354
type_ : ty. into_tcx ( tcx) ,
355
355
bounds : bounds. into_iter ( ) . map ( |x| x. into_tcx ( tcx) ) . collect ( ) ,
356
- // FIXME: add `bound_params` to rustdoc-json-params?
356
+ generic_params : bound_params
357
+ . into_iter ( )
358
+ . map ( |x| GenericParamDef {
359
+ name : x. 0 . to_string ( ) ,
360
+ kind : GenericParamDefKind :: Lifetime { outlives : vec ! [ ] } ,
361
+ } )
362
+ . collect ( ) ,
357
363
} ,
358
364
RegionPredicate { lifetime, bounds } => WherePredicate :: RegionPredicate {
359
365
lifetime : lifetime. 0 . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -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 ,
You can’t perform that action at this time.
0 commit comments