about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-06-17 00:28:21 -0700
committerGitHub <noreply@github.com>2025-06-17 00:28:21 -0700
commit68ebae97c59783671c7497dd70a07fb7febf7d61 (patch)
treef6342e7617432ff1172e32c515cd353fe4c7755a /src
parent38000833992f90ab20713a6ad0af48e898737b64 (diff)
parentfb75e09914bdba9280a0dd3e992ad066e0a5c5a3 (diff)
downloadrust-68ebae97c59783671c7497dd70a07fb7febf7d61.tar.gz
rust-68ebae97c59783671c7497dd70a07fb7febf7d61.zip
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 rust-lang/rust#94591.

r? `@aDotInTheVoid`
Diffstat (limited to 'src')
-rw-r--r--src/rustdoc-json-types/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs
index 8a3ab6f8640..2c94b8f914f 100644
--- a/src/rustdoc-json-types/lib.rs
+++ b/src/rustdoc-json-types/lib.rs
@@ -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
 pub const FORMAT_VERSION: u32 = 46;
 
 /// The root of the emitted JSON blob.