From 4980bf3ec723c93c3f4610dd214cf0431afb044e Mon Sep 17 00:00:00 2001 From: schvv31n Date: Sat, 6 Jul 2024 21:55:39 +0100 Subject: [PATCH] elaborate the docs of FORMAT_VERSION --- src/rustdoc-json-types/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index e49e831ac9563..27e35c1775bb8 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -7,7 +7,11 @@ use rustc_hash::FxHashMap; use serde::{Deserialize, Serialize}; use std::path::PathBuf; -/// rustdoc format-version. +/// The version of JSON output that this crate represents. +/// +/// 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. pub const FORMAT_VERSION: u32 = 32; /// The root of the emitted JSON blob.