Skip to content

Commit d018ef1

Browse files
committed
Add notes to keep the UnusedExterns structs synced up
1 parent d8c9a28 commit d018ef1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compiler/rustc_errors/src/json.rs

+4
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ struct FutureIncompatReport {
335335
future_incompat_report: Vec<FutureBreakageItem>,
336336
}
337337

338+
// NOTE: Keep this in sync with the equivalent structs in rustdoc's
339+
// doctest component (as well as cargo).
340+
// We could unify this struct the one in rustdoc but they have different
341+
// ownership semantics, so doing so would create wasteful allocations.
338342
#[derive(Encodable)]
339343
struct UnusedExterns<'a, 'b, 'c> {
340344
/// The severity level of the unused dependencies lint

src/librustdoc/doctest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ impl DirState {
278278
}
279279
}
280280

281+
// NOTE: Keep this in sync with the equivalent structs in rustc
282+
// and cargo.
283+
// We could unify this struct the one in rustc but they have different
284+
// ownership semantics, so doing so would create wasteful allocations.
281285
#[derive(serde::Serialize, serde::Deserialize)]
282286
struct UnusedExterns {
283287
/// Lint level of the unused_crate_dependencies lint

0 commit comments

Comments
 (0)