diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
commit | 4547b622d8d29df964fa2914213088b148c498fc (patch) | |
tree | 9fc6b25f3c3add6b745be9a2400a6e96140046e9 /src/rustdoc-json-types | |
parent | Releasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz rustc-4547b622d8d29df964fa2914213088b148c498fc.zip |
Merging upstream version 1.67.1+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 | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 4bc91fc40..1ee96b823 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 = 22; +pub const FORMAT_VERSION: u32 = 23; /// 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 @@ -53,7 +53,7 @@ pub struct ItemSummary { /// `["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 + /// defined. Currently, 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>, @@ -210,7 +210,6 @@ pub enum ItemKind { Constant, Trait, TraitAlias, - Method, Impl, Static, ForeignType, @@ -243,7 +242,6 @@ pub enum ItemEnum { Trait(Trait), TraitAlias(TraitAlias), - Method(Method), Impl(Impl), Typedef(Typedef), @@ -351,7 +349,7 @@ pub enum Variant { /// A variant with unnamed fields. /// /// Unlike most of json, `#[doc(hidden)]` fields will be given as `None` - /// instead of being ommited, because order matters. + /// instead of being omitted, because order matters. /// /// ```rust /// enum Demo { @@ -415,18 +413,12 @@ pub enum Abi { Other(String), } +/// Represents a function (including methods and other associated functions) #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Function { pub decl: FnDecl, pub generics: Generics, pub header: Header, -} - -#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub struct Method { - pub decl: FnDecl, - pub generics: Generics, - pub header: Header, pub has_body: bool, } @@ -623,6 +615,10 @@ pub struct FunctionPointer { #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct FnDecl { + /// List of argument names and their type. + /// + /// Note that not all names will be valid identifiers, as some of + /// them may be patterns. pub inputs: Vec<(String, Type)>, pub output: Option<Type>, pub c_variadic: bool, |