Skip to content

Commit 6a81cd3

Browse files
committed
v0.37.0
1 parent ace5ad2 commit 6a81cd3

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="v0.37.0"></a>
2+
# [v0.37.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.37.0) - 2025-03-14
3+
4+
**Breaking Change**: Change `GenericBound::Use` from `Vec<String>` to
5+
`Vec<PreciseCapturingArg>`, a new enum
6+
([rust#138109](https://github.com/rust-lang/rust/pull/138109)).
7+
8+
- Format Version: 41
9+
- Upstream Commit: [`112f7b01a1b25035cd8b288d6936c6be48a3d845`](https://github.com/rust-lang/rust/commit/112f7b01a1b25035cd8b288d6936c6be48a3d845)
10+
- Diff: [v0.36.0...v0.37.0](https://github.com/rust-lang/rustdoc-types/compare/v0.36.0...v0.37.0)
11+
112
<a name="v0.36.0"></a>
213
# [v0.36.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.36.0) - 2025-02-26
314

COMMIT.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f321f107e3af37996ac6cca74294d581f2fb20e7
1+
112f7b01a1b25035cd8b288d6936c6be48a3d845

Cargo.toml

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

src/lib.rs

+18-2
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 = 40;
32+
pub const FORMAT_VERSION: u32 = 41;
3333

3434
/// The root of the emitted JSON blob.
3535
///
@@ -908,7 +908,7 @@ pub enum GenericBound {
908908
/// ```
909909
Outlives(String),
910910
/// `use<'a, T>` precise-capturing bound syntax
911-
Use(Vec<String>),
911+
Use(Vec<PreciseCapturingArg>),
912912
}
913913

914914
/// A set of modifiers applied to a trait.
@@ -926,6 +926,22 @@ pub enum TraitBoundModifier {
926926
MaybeConst,
927927
}
928928

929+
/// One precise capturing argument. See [the rust reference](https://doc.rust-lang.org/reference/types/impl-trait.html#precise-capturing).
930+
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
931+
#[serde(rename_all = "snake_case")]
932+
pub enum PreciseCapturingArg {
933+
/// A lifetime.
934+
/// ```rust
935+
/// pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
936+
/// // ^^
937+
Lifetime(String),
938+
/// A type or constant parameter.
939+
/// ```rust
940+
/// pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
941+
/// // ^ ^
942+
Param(String),
943+
}
944+
929945
/// Either a type or a constant, usually stored as the right-hand side of an equation in places like
930946
/// [`AssocItemConstraint`]
931947
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]

0 commit comments

Comments
 (0)