Skip to content

Commit c5fce54

Browse files
committed
v0.6.0
1 parent ed25301 commit c5fce54

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

COMMIT.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
43f4ef5c6a059c32e19483ff3d295feb2f37c5b8
1+
1521b53c532ccd90c504b0c860cd5662172cc05e

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustdoc-types"
3-
version = "0.5.0"
3+
version = "0.6.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

+12-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ use std::path::PathBuf;
88

99
use serde::{Deserialize, Serialize};
1010

11+
/// rustdoc format-version.
12+
pub const FORMAT_VERSION: u32 = 10;
13+
1114
/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
1215
/// about the language items in the local crate, as well as info about external items to allow
1316
/// tools to find or link to them.
@@ -148,7 +151,7 @@ pub struct TypeBinding {
148151
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
149152
#[serde(rename_all = "snake_case")]
150153
pub enum TypeBindingKind {
151-
Equality(Type),
154+
Equality(Term),
152155
Constraint(Vec<GenericBound>),
153156
}
154157

@@ -335,7 +338,7 @@ pub enum GenericParamDefKind {
335338
pub enum WherePredicate {
336339
BoundPredicate { ty: Type, bounds: Vec<GenericBound> },
337340
RegionPredicate { lifetime: String, bounds: Vec<GenericBound> },
338-
EqPredicate { lhs: Type, rhs: Type },
341+
EqPredicate { lhs: Type, rhs: Term },
339342
}
340343

341344
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
@@ -359,6 +362,13 @@ pub enum TraitBoundModifier {
359362
MaybeConst,
360363
}
361364

365+
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
366+
#[serde(rename_all = "snake_case")]
367+
pub enum Term {
368+
Type(Type),
369+
Constant(Constant),
370+
}
371+
362372
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
363373
#[serde(rename_all = "snake_case")]
364374
#[serde(tag = "kind", content = "inner")]
@@ -510,8 +520,5 @@ pub struct Static {
510520
pub expr: String,
511521
}
512522

513-
/// rustdoc format-version.
514-
pub const FORMAT_VERSION: u32 = 9;
515-
516523
#[cfg(test)]
517524
mod tests;

0 commit comments

Comments
 (0)