diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /src/rustdoc-json-types | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rustdoc-json-types')
-rw-r--r-- | src/rustdoc-json-types/lib.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index fb1830426..4bc91fc40 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 @@ -51,6 +51,11 @@ pub struct ItemSummary { pub crate_id: u32, /// The list of path components for the fully qualified path of this item (e.g. /// `["std", "io", "lazy", "Lazy"]` for `std::io::lazy::Lazy`). + /// + /// Note that items can appear in multiple paths, and the one chosen is implementation + /// defined. Currenty, this is the full path to where the item was defined. Eg + /// [`String`] is currently `["alloc", "string", "String"]` and [`HashMap`] is + /// `["std", "collections", "hash", "map", "HashMap"]`, but this is subject to change. pub path: Vec<String>, /// Whether this item is a struct, trait, macro, etc. pub kind: ItemKind, @@ -254,7 +259,7 @@ pub enum ItemEnum { Macro(String), ProcMacro(ProcMacro), - PrimitiveType(String), + Primitive(Primitive), AssocConst { #[serde(rename = "type")] @@ -709,5 +714,11 @@ pub struct Static { pub expr: String, } +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub struct Primitive { + pub name: String, + pub impls: Vec<Id>, +} + #[cfg(test)] mod tests; |