Skip to content

Commit 7c52e05

Browse files
committed
Support nightly-2025-06-22 and later
1 parent 8b59b2f commit 7c52e05

File tree

13 files changed

+33
-16
lines changed

13 files changed

+33
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# `cargo-public-api` changelog
22

3+
## v0.48.0
4+
* Support `nightly-2025-06-22` and later.
5+
36
## v0.47.1
47
* Don't panic on `resolver = 3` in `Cargo.toml`.
58

Cargo.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Install the `cargo public-api` subcommand with a recent regular **stable** Rust
1010
cargo +stable install cargo-public-api --locked
1111
```
1212

13-
Ensure **nightly-2025-03-24** or later is installed (does not need to be the active toolchain) so `cargo public-api` can build rustdoc JSON for you:
13+
Ensure **nightly-2025-06-22** or later is installed (does not need to be the active toolchain) so `cargo public-api` can build rustdoc JSON for you:
1414

1515
```sh
1616
rustup install nightly --profile minimal
@@ -153,12 +153,12 @@ cargo public-api -sss
153153

154154
| Version | Understands the rustdoc JSON output of |
155155
| ---------------- | --------------------------------------- |
156-
| 0.47.x | nightly-2025-03-24 — |
156+
| 0.48.x | nightly-2025-06-22 — |
157+
| 0.47.x | nightly-2025-03-24 — nightly-2025-06-21 |
157158
| 0.46.x | nightly-2025-03-16 — nightly-2025-03-23 |
158159
| 0.45.x | nightly-2025-03-14 — nightly-2025-03-15 |
159160
| 0.43.x — 0.44.x | nightly-2025-01-25 — nightly-2025-03-13 |
160161
| 0.40.x — 0.42.x | nightly-2024-10-18 — nightly-2025-01-24 |
161-
| 0.39.x | nightly-2024-10-13 — nightly-2024-10-17 |
162162
| earlier versions | see [here](https://github.com/cargo-public-api/cargo-public-api/blob/main/scripts/release-helper/src/version_info.rs) |
163163

164164
# Contributing

cargo-public-api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2024"
33
name = "cargo-public-api"
4-
version = "0.47.1"
4+
version = "0.48.0"
55
default-run = "cargo-public-api"
66
description = "List and diff the public API of Rust library crates between releases and commits. Detect breaking API changes and semver violations via CI or a CLI."
77
homepage = "https://github.com/cargo-public-api/cargo-public-api"
@@ -44,7 +44,7 @@ version = "0.9.6"
4444

4545
[dependencies.public-api]
4646
path = "../public-api"
47-
version = "0.47.1"
47+
version = "0.48.0"
4848

4949
[dependencies.serde]
5050
version = "1.0.179"

cargo-public-api/tests/cargo-public-api-bin-tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ fn debug_logging() {
183183
/// * [`MINIMUM_NIGHTLY_RUST_VERSION`] is not set too high
184184
/// * `cargo pubic-api` suggests the nightly toolchain might be too old when a
185185
/// too old nightly toolchain is used
186+
///
187+
/// Note: If there is no rustdoc JSON incompatibilities in the previous version,
188+
/// this test will fail. In that case, feel to add an `#[ignore]` in the
189+
/// meantime.
186190
#[test]
187191
#[ignore = "this test assumes rustdoc JSON incomaptibilities in the previous version but that is not the case right now"]
188192
fn one_day_before_minimum_nightly_rust_version() {

cargo-public-api/tests/snapshots/cargo_public_api_bin_tests__comprehensive_api.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub fn comprehensive_api::functions::dyn_arg_one_trait(d: &dyn std::io::Write)
102102
pub fn comprehensive_api::functions::dyn_arg_one_trait_one_lifetime(d: &(dyn std::io::Write + 'static))
103103
pub fn comprehensive_api::functions::dyn_arg_two_traits(d: &(dyn std::io::Write + core::marker::Send))
104104
pub fn comprehensive_api::functions::dyn_arg_two_traits_one_lifetime(d: &(dyn std::io::Write + core::marker::Send + 'static))
105-
pub fn comprehensive_api::functions::fn_arg(f: impl core::ops::function::Fn(bool, comprehensive_api::structs::Plain) -> bool, f_mut: impl core::ops::function::FnMut())
105+
pub fn comprehensive_api::functions::fn_arg(f: impl core::ops::function::Fn(bool, comprehensive_api::structs::Plain) -> bool, f_mut: impl core::ops::function::FnMut)
106106
pub fn comprehensive_api::functions::generic_arg<T>(t: T) -> T
107107
pub fn comprehensive_api::functions::generic_bound<T: core::marker::Sized>(t: T) -> T
108108
pub fn comprehensive_api::functions::impl_multiple<T>(t: impl comprehensive_api::traits::Simple + core::convert::AsRef<T>) -> impl comprehensive_api::traits::Simple

public-api/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# `public-api` changelog
22

3+
## v0.48.0
4+
* Support `nightly-2025-06-22` and later.
5+
36
## v0.47.1
47
* Bump deps.
58

public-api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2024"
33
name = "public-api"
4-
version = "0.47.1"
4+
version = "0.48.0"
55
description = "List and diff the public API of Rust library crates. Relies on rustdoc JSON output from the nightly toolchain."
66
homepage = "https://github.com/cargo-public-api/cargo-public-api/tree/main/public-api"
77
documentation = "https://docs.rs/public-api"
@@ -23,7 +23,7 @@ version = "1.0.104"
2323
features = ["unbounded_depth"]
2424

2525
[dependencies.rustdoc-types]
26-
version = "0.39.0"
26+
version = "0.51.0"
2727

2828
[dev-dependencies]
2929
anyhow = "1.0.75"

public-api/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub use public_item::PublicItem;
6262
/// The rustdoc JSON format is still changing, so every now and then we update
6363
/// this library to support the latest format. If you use this version of
6464
/// nightly or later, you should be fine.
65-
pub const MINIMUM_NIGHTLY_RUST_VERSION: &str = "nightly-2025-03-24";
65+
pub const MINIMUM_NIGHTLY_RUST_VERSION: &str = "nightly-2025-06-22";
6666
// End-marker for scripts/release-helper/src/bin/update-version-info/main.rs
6767

6868
/// See [`Builder`] method docs for what each field means.

public-api/src/render.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,9 @@ impl<'c> RenderingContext<'c> {
787787

788788
fn render_assoc_item_constraint(&self, constraints: &AssocItemConstraint) -> Vec<Token> {
789789
let mut output = vec![Token::identifier(&constraints.name)];
790-
output.extend(self.render_generic_args(&constraints.args));
790+
if let Some(generic_args) = &constraints.args {
791+
output.extend(self.render_generic_args(generic_args));
792+
}
791793
match &constraints.binding {
792794
AssocItemConstraintKind::Equality(term) => {
793795
output.extend(equals());

0 commit comments

Comments
 (0)