diff options
Diffstat (limited to 'src/rustdoc-json-types/lib.rs')
-rw-r--r-- | src/rustdoc-json-types/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 3cf8ceed6..ba8eeaa66 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; use std::path::PathBuf; /// rustdoc format-version. -pub const FORMAT_VERSION: u32 = 24; +pub const FORMAT_VERSION: u32 = 26; /// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information /// about the language items in the local crate, as well as info about external items to allow @@ -83,7 +83,6 @@ pub struct Item { /// Stringified versions of the attributes on this item (e.g. `"#[inline]"`) pub attrs: Vec<String>, pub deprecation: Option<Deprecation>, - #[serde(flatten)] pub inner: ItemEnum, } @@ -222,7 +221,7 @@ pub enum ItemKind { } #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(tag = "kind", content = "inner", rename_all = "snake_case")] +#[serde(rename_all = "snake_case")] pub enum ItemEnum { Module(Module), ExternCrate { @@ -543,7 +542,6 @@ pub enum Term { #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] -#[serde(tag = "kind", content = "inner")] pub enum Type { /// Structs, enums, and unions ResolvedPath(Path), @@ -581,13 +579,15 @@ pub enum Type { #[serde(rename = "type")] type_: Box<Type>, }, - /// `<Type as Trait>::Name` or associated types like `T::Item` where `T: Iterator` + /// Associated types like `<Type as Trait>::Name` and `T::Item` where + /// `T: Iterator` or inherent associated types like `Struct::Name`. QualifiedPath { name: String, args: Box<GenericArgs>, self_type: Box<Type>, + /// `None` iff this is an *inherent* associated type. #[serde(rename = "trait")] - trait_: Path, + trait_: Option<Path>, }, } |