Skip to content

Add a comment to FORMAT_VERSION. #142601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/rustdoc-json-types/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ pub type FxHashMap<K, V> = HashMap<K, V>; // re-export for use in src/librustdoc
/// This integer is incremented with every breaking change to the API,
/// and is returned along with the JSON blob as [`Crate::format_version`].
/// Consuming code should assert that this value matches the format version(s) that it supports.
//
// WARNING: When you update `FORMAT_VERSION`, please also update the "Latest feature" line with a
// description of the change. This minimizes the risk of two concurrent PRs changing
// `FORMAT_VERSION` from N to N+1 and git merging them without conflicts; the "Latest feature" line
// 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: rustdoc JSON: Don't apply #[repr] privacy heuristics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking that we can strengthen this check by also ensuring this line is updated when FORMAT_VERSION is updated. Gonna send a PR for that.

pub const FORMAT_VERSION: u32 = 46;

/// The root of the emitted JSON blob.
Expand Down
Loading