Skip to content

Commit 129ba43

Browse files
committed
v0.46.0
1 parent 53c9ba0 commit 129ba43

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
<a name="v0.46.0"></a>
2+
# [v0.46.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.46.0) - 2025-06-03
3+
4+
**Versioning Change**: The crate version now corresponds to the `FORMAT_VERSION` constant.
5+
([#24](https://github.com/rust-lang/rustdoc-types/issues/24))
6+
7+
**Feature**: `Id` now implments `Ord` and `PartialOrd`, making it usable as a
8+
key in a `BTreeMap`
9+
([rust#141898](https://github.com/rust-lang/rust/pull/141898)).
10+
11+
**Breaking Change(??)**: `Item::attrs` now always includes `#[repr]`. No changes
12+
were made to the schema but the format version has been bumped, as this may
13+
effect consuming tools regardless
14+
([rust#141126](https://github.com/rust-lang/rust/pull/141126)).
15+
16+
**Documentation Improvements**: Fixed some false docs
17+
([rust#141364](https://github.com/rust-lang/rust/pull/141364)).
18+
19+
- Format Version: 46
20+
- Upstream Commit: [`6be3c3ceb7351677999c661dfba0110992b37132`](https://github.com/rust-lang/rust/commit/6be3c3ceb7351677999c661dfba0110992b37132)
21+
- Diff: [v0.41.0...v0.46.0](https://github.com/rust-lang/rustdoc-types/compare/v0.41.0...v0.46.0)
22+
123
<a name="v0.41.0"></a>
224
# [v0.41.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.41.0) - 2025-04-20
325

COMMIT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
076016d55afdf760c7e30e23c5df8f0c079cd85b
1+
6be3c3ceb7351677999c661dfba0110992b37132

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustdoc-types"
3-
version = "0.41.0"
3+
version = "0.46.0"
44
edition = "2018"
55
license = "MIT OR Apache-2.0"
66
description = "Types for rustdoc's json output"

src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize};
2929
/// This integer is incremented with every breaking change to the API,
3030
/// and is returned along with the JSON blob as [`Crate::format_version`].
3131
/// Consuming code should assert that this value matches the format version(s) that it supports.
32-
pub const FORMAT_VERSION: u32 = 45;
32+
pub const FORMAT_VERSION: u32 = 46;
3333

3434
/// The root of the emitted JSON blob.
3535
///
@@ -179,19 +179,13 @@ pub struct Item {
179179
///
180180
/// Does not include `#[deprecated]` attributes: see the [`Self::deprecation`] field instead.
181181
///
182-
/// Some attributes appear in pretty-printed Rust form, regardless of their formatting
182+
/// Attributes appear in pretty-printed Rust form, regardless of their formatting
183183
/// in the original source code. For example:
184184
/// - `#[non_exhaustive]` and `#[must_use]` are represented as themselves.
185185
/// - `#[no_mangle]` and `#[export_name]` are also represented as themselves.
186186
/// - `#[repr(C)]` and other reprs also appear as themselves,
187187
/// though potentially with a different order: e.g. `repr(i8, C)` may become `repr(C, i8)`.
188188
/// Multiple repr attributes on the same item may be combined into an equivalent single attr.
189-
///
190-
/// Other attributes may appear debug-printed. For example:
191-
/// - `#[inline]` becomes something similar to `#[attr="Inline(Hint)"]`.
192-
///
193-
/// As an internal implementation detail subject to change, this debug-printing format
194-
/// is currently equivalent to the HIR pretty-printing of parsed attributes.
195189
pub attrs: Vec<String>,
196190
/// Information about the item’s deprecation, if present.
197191
pub deprecation: Option<Deprecation>,
@@ -393,7 +387,7 @@ pub enum AssocItemConstraintKind {
393387
/// Rustdoc makes no guarantees about the inner value of Id's. Applications
394388
/// should treat them as opaque keys to lookup items, and avoid attempting
395389
/// to parse them, or otherwise depend on any implementation details.
396-
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
390+
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
397391
// FIXME(aDotInTheVoid): Consider making this non-public in rustdoc-types.
398392
pub struct Id(pub u32);
399393

0 commit comments

Comments
 (0)