From aac7429c17aa558fbd9fb0be093e7bd9ccc73972 Mon Sep 17 00:00:00 2001 From: Nixon Enraght-Moony Date: Mon, 26 Sep 2022 18:06:48 +0100 Subject: Rustdoc-Json: List impls for primitives Closes #101695 --- src/rustdoc-json-types/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/rustdoc-json-types') diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index fb183042670..7379b04ad16 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -9,7 +9,7 @@ use std::path::PathBuf; use serde::{Deserialize, Serialize}; /// rustdoc format-version. -pub const FORMAT_VERSION: u32 = 21; +pub const FORMAT_VERSION: u32 = 22; /// 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 @@ -254,7 +254,7 @@ pub enum ItemEnum { Macro(String), ProcMacro(ProcMacro), - PrimitiveType(String), + Primitive(Primitive), AssocConst { #[serde(rename = "type")] @@ -709,5 +709,11 @@ pub struct Static { pub expr: String, } +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub struct Primitive { + pub name: String, + pub impls: Vec, +} + #[cfg(test)] mod tests; -- cgit 1.4.1-3-g733a5