File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 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 {
350350 fn from_tcx ( predicate : clean:: WherePredicate , tcx : TyCtxt < ' _ > ) -> Self {
351351 use clean:: WherePredicate :: * ;
352352 match predicate {
353- BoundPredicate { ty, bounds, .. } => WherePredicate :: BoundPredicate {
353+ BoundPredicate { ty, bounds, bound_params } => WherePredicate :: BoundPredicate {
354354 type_ : ty. into_tcx ( tcx) ,
355355 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 ( ) ,
357363 } ,
358364 RegionPredicate { lifetime, bounds } => WherePredicate :: RegionPredicate {
359365 lifetime : lifetime. 0 . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -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 ,
You can’t perform that action at this time.
0 commit comments