diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38df2d3..d1d32bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+
+# [v0.60.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.59.0) - 2026-06-30
+
+**Breaking change**: Add `default_unstable` field into `Function`, `AssocConst` and `AssocType`.
+([rust#158468](https://github.com/rust-lang/rust/pull/158468))
+
+- Format Version: 60
+- Upstream Commit: [`bd938c5bfb48fe83ef8f2f54f562c2394c17d89f`](https://github.com/rust-lang/rust/commit/bd938c5bfb48fe83ef8f2f54f562c2394c17d89f)
+- Diff: [v0.59.0...v0.60.0](https://github.com/rust-lang/rustdoc-types/compare/v0.59.0..v0.60.0)
+
+
# [v0.59.0](https://github.com/rust-lang/rustdoc-types/releases/tag/v0.59.0) - 2026-06-26
**Breaking change**: Add `Item::const_stability` field
diff --git a/COMMIT.txt b/COMMIT.txt
index 5330f9d..4a611db 100644
--- a/COMMIT.txt
+++ b/COMMIT.txt
@@ -1 +1 @@
-f8973b70ce31656cfd69bde2d20e6e8240448080
+bd938c5bfb48fe83ef8f2f54f562c2394c17d89f
diff --git a/Cargo.lock b/Cargo.lock
index c665b90..a3fed1c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -271,7 +271,7 @@ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
[[package]]
name = "rustdoc-types"
-version = "0.59.0"
+version = "0.60.0"
dependencies = [
"postcard",
"rkyv",
diff --git a/Cargo.toml b/Cargo.toml
index 72e9d9e..19fb3a3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rustdoc-types"
-version = "0.59.0"
+version = "0.60.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Types for rustdoc's json output"
diff --git a/src/lib.rs b/src/lib.rs
index 91e030f..b4a4525 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -113,8 +113,8 @@ use serde_derive::{Deserialize, Serialize};
// will instead cause conflicts. See #94591 for more. (This paragraph and the "Latest feature" line
// are deliberately not in a doc comment, because they need not be in public docs.)
//
-// Latest feature: Add `Item::const_stability`.
-pub const FORMAT_VERSION: u32 = 59;
+// Latest feature: Add default-body stability metadata.
+pub const FORMAT_VERSION: u32 = 60;
/// The root of the emitted JSON blob.
///
@@ -287,6 +287,9 @@ pub struct Item {
/// - `#[stable]` and `#[unstable]` attributes: see the [`Self::stability`] field instead.
/// - `#[rustc_const_stable]` and `#[rustc_const_unstable]` attributes:
/// see the [`Self::const_stability`] field instead.
+ /// - `#[rustc_default_body_unstable]` attributes: instead see `default_unstable` fields on
+ /// item kinds that can have unstable default values, such as [`Function::default_unstable`],
+ /// [`ItemEnum::AssocConst::default_unstable`], and [`ItemEnum::AssocType::default_unstable`].
///
/// Attributes appear in pretty-printed Rust form, regardless of their formatting
/// in the original source code. For example:
@@ -366,6 +369,19 @@ pub enum StabilityLevel {
Unstable,
}
+/// Information about an unstable default provided by a trait item.
+///
+/// Example unstable defaults include:
+/// - a stable trait function or method whose body is not stable
+/// - a stable trait associated type or const whose default value is not stable
+#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[cfg_attr(feature = "rkyv_0_8", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))]
+#[cfg_attr(feature = "rkyv_0_8", rkyv(derive(Debug)))]
+pub struct ProvidedDefaultUnstable {
+ /// The feature that must be enabled to use the provided default.
+ pub feature: String,
+}
+
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "rkyv_0_8", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))]
#[cfg_attr(feature = "rkyv_0_8", rkyv(derive(Debug)))]
@@ -378,6 +394,9 @@ pub enum StabilityLevel {
/// - `#[stable]` and `#[unstable]`. These are in [`Item::stability`] instead.
/// - `#[rustc_const_stable]` and `#[rustc_const_unstable]`. These are in
/// [`Item::const_stability`] instead.
+/// - `#[rustc_default_body_unstable]`. These are in the `default_unstable` field on the appropriate
+/// item kinds: [`Function::default_unstable`], [`ItemEnum::AssocConst::default_unstable`],
+/// and [`ItemEnum::AssocType::default_unstable`].
pub enum Attribute {
/// `#[non_exhaustive]`
NonExhaustive,
@@ -874,6 +893,11 @@ pub enum ItemEnum {
/// // ^^^^^^^^^^
/// ```
value: Option,
+ /// Metadata about an unstable default value provided for the associated constant, if any.
+ ///
+ /// Empty if the associated constant has no default (see [`ItemEnum::AssocConst::value`]),
+ /// or if the default value is stable.
+ default_unstable: Option>,
},
/// An associated type of a trait or a type.
AssocType {
@@ -898,6 +922,11 @@ pub enum ItemEnum {
/// ```
#[serde(rename = "type")]
type_: Option,
+ /// Metadata about an unstable default value provided for the associated type, if any.
+ ///
+ /// Empty if the associated type has no default (see [`ItemEnum::AssocType::type_`]),
+ /// or if the default value is stable.
+ default_unstable: Option>,
},
}
@@ -1187,6 +1216,12 @@ pub struct Function {
pub header: FunctionHeader,
/// Whether the function has a body, i.e. an implementation.
pub has_body: bool,
+ /// Metadata about a possible unstable provided default implementation for trait methods.
+ ///
+ /// Only populated for function items inside traits. Empty if the trait method
+ /// does not have a default implementation (see [`Function::has_body`]),
+ /// or if its default implementation is stable.
+ pub default_unstable: Option>,
}
/// Generic parameters accepted by an item and `where` clauses imposed on it and the parameters.