Problem
This regression has been noticed when running the integration test of BuFFI after updating the toolchain from Rust 1.95.0 to 1.96.0.
For the functionality of BuFFI we rely on attribute information being provided in the output of rustdoc json which we parse using rustdoc-types. We are aware that this json output is unstable and we usually can adjust our side to keep track, but this time the version of rustdoc-types has not changed, yet it seems that some attribute information that was provided as part of Item objects seems to have vanished completely. After checking it I can confirm that it is not showing up in the rustdoc json output anymore.
Code
We have this enum in the example for BuFFI and we rely on the attributes to generate the correct FFI code.
#[derive(serde::Serialize, serde::Deserialize)]
pub enum RandomEnum {
/// An empty case that is here to make the test simpler
NoValue,
/// A timestamp from chrono that we would like to use in the API
TimeStamp(#[serde(with = "crate::DateTimeHelper")] DateTime<Utc>),
}
I have chosen this example because it is the point where the test currently fails. There are more types in the example that show the various ways how we make use of attributes. If necessary I can provide a smaller example where it is also visible that the attributes are not part of the rustdoc json anymore.
If we have a look at the case TimeStamp, we want to have information about the serde attribute.
After parsing the generated json with rustdoc-types and resolving it partially, before we had
...
attrs: [
Other(
"#[serde(with = \"crate::DateTimeHelper\")]",
),
],
...
dbg! output on 1.95.0
[buffi/src/lib.rs:1486:29] &t = Item {
id: Id(
126,
),
crate_id: 0,
name: Some(
"0",
),
span: Some(
Span {
filename: "example/buffi_example/src/lib.rs",
begin: (
69,
56,
),
end: (
69,
69,
),
},
),
visibility: Default,
docs: None,
links: {},
attrs: [
Other(
"#[serde(with = \"crate::DateTimeHelper\")]",
),
],
deprecation: None,
inner: StructField(
ResolvedPath(
Path {
path: "chrono::DateTime",
id: Id(
94,
),
args: Some(
AngleBracketed {
args: [
Type(
ResolvedPath(
Path {
path: "chrono::Utc",
id: Id(
95,
),
args: None,
},
),
),
],
constraints: [],
},
),
},
),
),
}
while now we get
dbg! output on 1.96.0 (note the empty `attrs` field)
[buffi/src/lib.rs:1486:29] &t = Item {
id: Id(
126,
),
crate_id: 0,
name: Some(
"0",
),
span: Some(
Span {
filename: "example/buffi_example/src/lib.rs",
begin: (
69,
56,
),
end: (
69,
69,
),
},
),
visibility: Default,
docs: None,
links: {},
attrs: [],
deprecation: None,
inner: StructField(
ResolvedPath(
Path {
path: "chrono::DateTime",
id: Id(
94,
),
args: Some(
AngleBracketed {
args: [
Type(
ResolvedPath(
Path {
path: "chrono::Utc",
id: Id(
95,
),
args: None,
},
),
),
],
constraints: [],
},
),
},
),
),
}
Using cargo-bisect-rustc I was able to narrow down the problem to this commit eb9d3ca.
I think the relevat PR could be #153540.
Version it worked on
It most recently worked on: Rust 1.95.0
Version with regression
rustc --version --verbose:
rustc 1.96.0 (ac68faa20 2026-05-25)
binary: rustc
commit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96
commit-date: 2026-05-25
host: aarch64-apple-darwin
release: 1.96.0
LLVM version: 22.1.2
Pinging @aDotInTheVoid (we briefly chatted about BuFFI and its use of rustdoc json before) and @scrabsha (author of the PR listed above) because I think they could be interested in the regression and might be best suited to answer if that is intended or not. I hope that is ok. 😅
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
Problem
This regression has been noticed when running the integration test of BuFFI after updating the toolchain from Rust 1.95.0 to 1.96.0.
For the functionality of BuFFI we rely on attribute information being provided in the output of rustdoc json which we parse using
rustdoc-types. We are aware that this json output is unstable and we usually can adjust our side to keep track, but this time the version ofrustdoc-typeshas not changed, yet it seems that some attribute information that was provided as part ofItemobjects seems to have vanished completely. After checking it I can confirm that it is not showing up in the rustdoc json output anymore.Code
We have this enum in the example for BuFFI and we rely on the attributes to generate the correct FFI code.
I have chosen this example because it is the point where the test currently fails. There are more types in the example that show the various ways how we make use of attributes. If necessary I can provide a smaller example where it is also visible that the attributes are not part of the rustdoc json anymore.
If we have a look at the case
TimeStamp, we want to have information about theserdeattribute.After parsing the generated json with
rustdoc-typesand resolving it partially, before we haddbg! output on 1.95.0
while now we get
dbg! output on 1.96.0 (note the empty `attrs` field)
Using
cargo-bisect-rustcI was able to narrow down the problem to this commit eb9d3ca.I think the relevat PR could be #153540.
Version it worked on
It most recently worked on: Rust 1.95.0
Version with regression
rustc --version --verbose:Pinging @aDotInTheVoid (we briefly chatted about BuFFI and its use of rustdoc json before) and @scrabsha (author of the PR listed above) because I think they could be interested in the regression and might be best suited to answer if that is intended or not. I hope that is ok. 😅
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged