Skip to content

Commit 2eae85f

Browse files
committed
v0.11.0
1 parent 0f04ab2 commit 2eae85f

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

COMMIT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a5c0b1470cc48e665eabf29881dd87438973ab97
1+
1f15ce5f9748d523f3c1835da12b05b15648aa68

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustdoc-types"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
authors = ["Nixon Enraght-Moony <nixon.emoony@gmail.com>", "The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

src/lib.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::path::PathBuf;
99
use 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)]
488502
pub 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

Comments
 (0)