@@ -9,7 +9,7 @@ use std::path::PathBuf;
99use serde:: { Deserialize , Serialize } ;
1010
1111/// rustdoc format-version.
12- pub const FORMAT_VERSION : u32 = 21 ;
12+ pub const FORMAT_VERSION : u32 = 22 ;
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
@@ -254,7 +254,7 @@ pub enum ItemEnum {
254254 Macro ( String ) ,
255255 ProcMacro ( ProcMacro ) ,
256256
257- PrimitiveType ( String ) ,
257+ Primitive ( Primitive ) ,
258258
259259 AssocConst {
260260 #[ serde( rename = "type" ) ]
@@ -542,12 +542,12 @@ pub enum Term {
542542#[ serde( rename_all = "snake_case" ) ]
543543#[ serde( tag = "kind" , content = "inner" ) ]
544544pub enum Type {
545- /// Structs, enums, and traits
545+ /// Structs, enums, and unions
546546 ResolvedPath ( Path ) ,
547547 DynTrait ( DynTrait ) ,
548548 /// Parameterized types
549549 Generic ( String ) ,
550- /// Fixed-size numeric types (plus int/usize/float), char, arrays, slices , and tuples
550+ /// Built in numberic (i*, u*, f*) types, bool , and char
551551 Primitive ( String ) ,
552552 /// `extern "ABI" fn`
553553 FunctionPointer ( Box < FunctionPointer > ) ,
@@ -709,5 +709,11 @@ pub struct Static {
709709 pub expr : String ,
710710}
711711
712+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
713+ pub struct Primitive {
714+ pub name : String ,
715+ pub impls : Vec < Id > ,
716+ }
717+
712718#[ cfg( test) ]
713719mod tests;
0 commit comments