Skip to content

Commit 68ebae9

Browse files
Rollup merge of #142601 - nnethercote:format_version-comment, r=aDotInTheVoid
Add a comment to `FORMAT_VERSION`. This minimizes the chance of two PRs changing it from N to N+1. Fixes #94591. r? `@aDotInTheVoid`
2 parents 3800083 + fb75e09 commit 68ebae9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rustdoc-json-types/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ pub type FxHashMap<K, V> = HashMap<K, V>; // re-export for use in src/librustdoc
3030
/// This integer is incremented with every breaking change to the API,
3131
/// and is returned along with the JSON blob as [`Crate::format_version`].
3232
/// Consuming code should assert that this value matches the format version(s) that it supports.
33+
//
34+
// WARNING: When you update `FORMAT_VERSION`, please also update the "Latest feature" line with a
35+
// description of the change. This minimizes the risk of two concurrent PRs changing
36+
// `FORMAT_VERSION` from N to N+1 and git merging them without conflicts; the "Latest feature" line
37+
// will instead cause conflicts. See #94591 for more. (This paragraph and the "Latest feature" line
38+
// are deliberately not in a doc comment, because they need not be in public docs.)
39+
//
40+
// Latest feature: rustdoc JSON: Don't apply #[repr] privacy heuristics
3341
pub const FORMAT_VERSION: u32 = 46;
3442

3543
/// The root of the emitted JSON blob.

0 commit comments

Comments
 (0)