Rollup merge of #89906 - yuvaldolev:move-format-version-to-rustdoc-json-types, r=CraftSpider

Moved format-version constant to rustdoc-json-types

Addresses #88620

Moved format-version constant from rustdoc to rustdoc-json-types.
This commit is contained in:
Matthias Krüger 2021-10-16 08:02:23 +02:00 committed by GitHub
commit e98669a51a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -255,7 +255,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
) )
}) })
.collect(), .collect(),
format_version: 9, format_version: types::FORMAT_VERSION,
}; };
let mut p = self.out_path.clone(); let mut p = self.out_path.clone();
p.push(output.index.get(&output.root).unwrap().name.clone().unwrap()); p.push(output.index.get(&output.root).unwrap().name.clone().unwrap());

View File

@ -510,5 +510,8 @@ pub struct Static {
pub expr: String, pub expr: String,
} }
/// rustdoc format-version.
pub const FORMAT_VERSION: u32 = 9;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;