Skip to content

Commit 338e734

Browse files
committed
1 parent fd7b255 commit 338e734

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<a name="v0.16.0"></a>
2+
# [v0.16.0](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.16.0) - 2022-09-07
3+
- Format Version: 20
4+
- Upstream Commit: [`065e0b9c9cf3d03f286c5d0b98fbae7185e41b75`](https://github.com/rust-lang/rust/commit/065e0b9c9cf3d03f286c5d0b98fbae7185e41b75)
5+
- Diff: [v0.16.0...v0.15.0](https://github.com/aDotInTheVoid/rustdoc-types/compare/v0.15.0...v0.16.0)
6+
17
<a name="v0.15.0"></a>
28
# [v0.15.0](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.15.0) - 2022-09-05
39
- Format Version: 19

Diff for: COMMIT.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b76a012be16de964c242594afba4323997f436b2
1+
065e0b9c9cf3d03f286c5d0b98fbae7185e41b75

Diff for: 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.15.0"
3+
version = "0.16.0"
44
authors = ["Nixon Enraght-Moony <nixon.emoony@gmail.com>", "The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

Diff for: src/lib.rs

+30-3
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 = 19;
12+
pub const FORMAT_VERSION: u32 = 20;
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
@@ -308,9 +308,36 @@ pub struct Enum {
308308
#[serde(rename_all = "snake_case")]
309309
#[serde(tag = "variant_kind", content = "variant_inner")]
310310
pub enum Variant {
311+
/// A variant with no parentheses, and possible discriminant.
312+
///
313+
/// ```rust
314+
/// enum Demo {
315+
/// PlainVariant,
316+
/// PlainWithDiscriminant = 1,
317+
/// }
318+
/// ```
311319
Plain(Option<Discriminant>),
312-
Tuple(Vec<Type>),
313-
Struct(Vec<Id>),
320+
/// A variant with unnamed fields.
321+
///
322+
/// Unlike most of json, `#[doc(hidden)]` fields will be given as `None`
323+
/// instead of being ommited, because order matters.
324+
///
325+
/// ```rust
326+
/// enum Demo {
327+
/// TupleVariant(i32),
328+
/// EmptyTupleVariant(),
329+
/// }
330+
/// ```
331+
Tuple(Vec<Option<Id>>),
332+
/// A variant with named fields.
333+
///
334+
/// ```rust
335+
/// enum Demo {
336+
/// StructVariant { x: i32 },
337+
/// EmptyStructVariant {},
338+
/// }
339+
/// ```
340+
Struct { fields: Vec<Id>, fields_stripped: bool },
314341
}
315342

316343
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]

0 commit comments

Comments
 (0)