Skip to content

Commit

Permalink
v0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aDotInTheVoid committed Aug 15, 2022
1 parent 1eb50be commit 2a2d484
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<a name="v0.14.0"></a>
# [v0.14.0](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.14.0) - 2022-08-15
- Format Version: 18
- Upstream Commit: [`4989f6a7247930ba027fa4b96a0c284f6ab02942`](https://github.com/rust-lang/rust/commit/4989f6a7247930ba027fa4b96a0c284f6ab02942)
- Diff: [v0.14.0...v0.13.1](https://github.com/aDotInTheVoid/rustdoc-types/compare/v0.13.1...v0.14.0)

<a name="v0.13.1"></a>
# [v0.13.1](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.13.1) - 2022-08-10
- Format Version: 17
Expand Down
2 changes: 1 addition & 1 deletion COMMIT.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0dc39c7bd9795927b903c8c24e89a00788ce3e33
4989f6a7247930ba027fa4b96a0c284f6ab02942
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustdoc-types"
version = "0.13.1"
version = "0.14.0"
authors = ["Nixon Enraght-Moony <nixon.emoony@gmail.com>", "The Rust Project Developers"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
31 changes: 20 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::path::PathBuf;
use serde::{Deserialize, Serialize};

/// rustdoc format-version.
pub const FORMAT_VERSION: u32 = 17;
pub const FORMAT_VERSION: u32 = 18;

/// 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
Expand Down Expand Up @@ -133,7 +133,7 @@ pub struct DynTrait {
/// A trait and potential HRTBs
pub struct PolyTrait {
#[serde(rename = "trait")]
pub trait_: Type,
pub trait_: Path,
/// Used for Higher-Rank Trait Bounds (HRTBs)
/// ```text
/// dyn for<'a> Fn() -> &'a i32"
Expand Down Expand Up @@ -447,7 +447,7 @@ pub enum WherePredicate {
pub enum GenericBound {
TraitBound {
#[serde(rename = "trait")]
trait_: Type,
trait_: Path,
/// Used for Higher-Rank Trait Bounds (HRTBs)
/// ```text
/// where F: for<'a, 'b> Fn(&'a u8, &'b u8)
Expand Down Expand Up @@ -481,12 +481,7 @@ pub enum Term {
#[serde(tag = "kind", content = "inner")]
pub enum Type {
/// Structs, enums, and traits
ResolvedPath {
name: String,
id: Id,
args: Option<Box<GenericArgs>>,
param_names: Vec<GenericBound>,
},
ResolvedPath(Path),
DynTrait(DynTrait),
/// Parameterized types
Generic(String),
Expand Down Expand Up @@ -527,10 +522,24 @@ pub enum Type {
args: Box<GenericArgs>,
self_type: Box<Type>,
#[serde(rename = "trait")]
trait_: Box<Type>,
trait_: Path,
},
}

#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Path {
pub name: String,
pub id: Id,
/// Generic arguments to the type
/// ```test
/// std::borrow::Cow<'static, str>
/// ^^^^^^^^^^^^^^
/// |
/// this part
/// ```
pub args: Option<Box<GenericArgs>>,
}

#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct FunctionPointer {
pub decl: FnDecl,
Expand Down Expand Up @@ -574,7 +583,7 @@ pub struct Impl {
pub generics: Generics,
pub provided_trait_methods: Vec<String>,
#[serde(rename = "trait")]
pub trait_: Option<Type>,
pub trait_: Option<Path>,
#[serde(rename = "for")]
pub for_: Type,
pub items: Vec<Id>,
Expand Down

0 comments on commit 2a2d484

Please sign in to comment.