Skip to content

Commit a830067

Browse files
committed
v0.51.0
1 parent d5e32e5 commit a830067

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<a name="v0.51.0"></a>
2+
# [v0.51.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.51.0) - 2025-06-23
3+
4+
**Breaking Change**: Change `AssocItemConstraint::args` and `Type::QualifiedPath::args` from `GenericArgs` to `Option<Box<GenericArgs>>`.
5+
This is consistent with `Path::args`, and smaller on disk ([rust#142502](https://github.com/rust-lang/rust/pull/142502)).
6+
7+
- Format Version: 51
8+
- Upstream Commit: [`7fa8901cd090093a57723d3f196c27db3b98ad94`](https://github.com/rust-lang/rust/commit/7fa8901cd090093a57723d3f196c27db3b98ad94)
9+
- Diff: [v0.50.0...v0.51.0](https://github.com/rust-lang/rustdoc-types/compare/v0.50.0...v0.51.0)
10+
111
<a name="v0.50.0"></a>
212
# [v0.50.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.50.0) - 2025-06-23
313

COMMIT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b9107a83a1ace3f292641977df70e9610e0e4482
1+
7fa8901cd090093a57723d3f196c27db3b98ad94

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.50.0"
3+
version = "0.51.0"
44
edition = "2018"
55
license = "MIT OR Apache-2.0"
66
description = "Types for rustdoc's json output"

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ use serde_derive::{Deserialize, Serialize};
3636
// will instead cause conflicts. See #94591 for more. (This paragraph and the "Latest feature" line
3737
// are deliberately not in a doc comment, because they need not be in public docs.)
3838
//
39-
// Latest feature: Pretty printing of cold attributes changed
40-
pub const FORMAT_VERSION: u32 = 50;
39+
// Latest feature: improve handling of generic args
40+
pub const FORMAT_VERSION: u32 = 51;
4141

4242
/// The root of the emitted JSON blob.
4343
///
@@ -276,8 +276,8 @@ pub struct PolyTrait {
276276
/// A set of generic arguments provided to a path segment, e.g.
277277
///
278278
/// ```text
279-
/// std::option::Option::<u32>::None
280-
/// ^^^^^
279+
/// std::option::Option<u32>
280+
/// ^^^^^
281281
/// ```
282282
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
283283
#[serde(rename_all = "snake_case")]
@@ -330,7 +330,7 @@ pub enum GenericArg {
330330
Const(Constant),
331331
/// A generic argument that's explicitly set to be inferred.
332332
/// ```text
333-
/// std::vec::Vec::<_>::new()
333+
/// std::vec::Vec::<_>
334334
/// ^
335335
/// ```
336336
Infer,
@@ -361,7 +361,7 @@ pub struct AssocItemConstraint {
361361
/// The name of the associated type/constant.
362362
pub name: String,
363363
/// Arguments provided to the associated type/constant.
364-
pub args: GenericArgs,
364+
pub args: Option<Box<GenericArgs>>,
365365
/// The kind of bound applied to the associated type/constant.
366366
pub binding: AssocItemConstraintKind,
367367
}
@@ -1117,7 +1117,7 @@ pub enum Type {
11171117
/// <core::slice::IterMut<'static, u32> as BetterIterator>::Item<'static>
11181118
/// // ^^^^^^^^^
11191119
/// ```
1120-
args: Box<GenericArgs>,
1120+
args: Option<Box<GenericArgs>>,
11211121
/// The type with which this type is associated.
11221122
///
11231123
/// ```ignore (incomplete expression)

0 commit comments

Comments
 (0)