Skip to content

v0.36.0 #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<a name="v0.36.0"></a>
# [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)

<a name="v0.35.0"></a>
# [v0.35.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.35.0) - 2025-01-24

Expand Down
2 changes: 1 addition & 1 deletion COMMIT.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
40e28582bb95e33f762dea75b78f6ebb5c29b836
f321f107e3af37996ac6cca74294d581f2fb20e7
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.35.0"
version = "0.36.0"
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Types for rustdoc's json output"
Expand Down
13 changes: 11 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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 <https://crates.io/crates/regex-syntax>,
/// 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<String>,
Expand Down Expand Up @@ -112,7 +119,9 @@ pub struct Item {
pub docs: Option<String>,
/// 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<String, Id>,
/// 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<String>,
/// Information about the item’s deprecation, if present.
pub deprecation: Option<Deprecation>,
Expand Down
Loading