diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 637e5f2288d62..0031e3915fa40 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -255,7 +255,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { ) }) .collect(), - format_version: 9, + format_version: types::FORMAT_VERSION, }; let mut p = self.out_path.clone(); p.push(output.index.get(&output.root).unwrap().name.clone().unwrap()); diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 7c418697c1c1c..9466f84ffcd59 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -510,5 +510,8 @@ pub struct Static { pub expr: String, } +/// rustdoc format-version. +pub const FORMAT_VERSION: u32 = 9; + #[cfg(test)] mod tests;