diff --git a/CHANGELOG.md b/CHANGELOG.md index 42dfe49..43fe783 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ + +# [v0.36.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.36.0) - 2025-02-26 + +**Breaking Change**: Change format of `Item::attrs` from e.g. `"#[inline]"` to e.g. `#[attr="Inline(Hint)"]` which is equivalent to the hir pretty-printing of attributes ([rust#135726](https://github.com/rust-lang/rust/pull/135726)). + +- Format Version: 40 +- Upstream Commit: [`f321f107e3af37996ac6cca74294d581f2fb20e7`](https://github.com/rust-lang/rust/commit/f321f107e3af37996ac6cca74294d581f2fb20e7) +- Diff: [v0.35.0...v0.36.0](https://github.com/rust-lang/rustdoc-types/compare/v0.35.0...v0.36.0) + # [v0.35.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.35.0) - 2025-01-24 diff --git a/COMMIT.txt b/COMMIT.txt index e319968..54fa914 100644 --- a/COMMIT.txt +++ b/COMMIT.txt @@ -1 +1 @@ -40e28582bb95e33f762dea75b78f6ebb5c29b836 +f321f107e3af37996ac6cca74294d581f2fb20e7 diff --git a/Cargo.toml b/Cargo.toml index a598b4d..246486a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustdoc-types" -version = "0.35.0" +version = "0.36.0" edition = "2018" license = "MIT OR Apache-2.0" description = "Types for rustdoc's json output" diff --git a/src/lib.rs b/src/lib.rs index 2dcfbf1..3041476 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize}; /// This integer is incremented with every breaking change to the API, /// and is returned along with the JSON blob as [`Crate::format_version`]. /// Consuming code should assert that this value matches the format version(s) that it supports. -pub const FORMAT_VERSION: u32 = 39; +pub const FORMAT_VERSION: u32 = 40; /// The root of the emitted JSON blob. /// @@ -60,6 +60,13 @@ pub struct Crate { #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct ExternalCrate { /// The name of the crate. + /// + /// Note: This is the [*crate* name][crate-name], which may not be the same as the + /// [*package* name][package-name]. For example, for , + /// this field will be `regex_syntax` (which uses an `_`, not a `-`). + /// + /// [crate-name]: https://doc.rust-lang.org/stable/cargo/reference/cargo-targets.html#the-name-field + /// [package-name]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-name-field pub name: String, /// The root URL at which the crate's documentation lives. pub html_root_url: Option, @@ -112,7 +119,9 @@ pub struct Item { pub docs: Option, /// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs pub links: HashMap, - /// Stringified versions of the attributes on this item (e.g. `"#[inline]"`) + /// Stringified versions of parsed attributes on this item. + /// Essentially debug printed (e.g. `#[inline]` becomes something similar to `#[attr="Inline(Hint)"]`). + /// Equivalent to the hir pretty-printing of attributes. pub attrs: Vec, /// Information about the item’s deprecation, if present. pub deprecation: Option,