diff options
| -rw-r--r-- | src/rustdoc-json-types/lib.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 17b3859a77b..c045db9b231 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -408,7 +408,13 @@ pub enum GenericBound { TraitBound { #[serde(rename = "trait")] trait_: Type, - /// Used for HRTBs + /// Used for Higher-Rank Trait Bounds (HRTBs) + /// ```plain + /// where F: for<'a, 'b> Fn(&'a u8, &'b u8) + /// ^^^^^^^^^^^ + /// | + /// this part + /// ``` generic_params: Vec<GenericParamDef>, modifier: TraitBoundModifier, }, @@ -487,6 +493,13 @@ pub enum Type { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] pub struct FunctionPointer { pub decl: FnDecl, + /// Used for Higher-Rank Trait Bounds (HRTBs) + /// ```plain + /// for<'c> fn(val: &'c i32) -> i32 + /// ^^^^^^^ + /// | + /// this part + /// ``` pub generic_params: Vec<GenericParamDef>, pub header: Header, } |
