Skip to content

Commit bec77eb

Browse files
committed
rustdoc: Moved SCHEMA_VERSION to clean.
it should be changed when the module gets updated, so it helps to have the `SCHEMA_VERSION` with the definitions themselves.
1 parent b03547b commit bec77eb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/librustdoc/clean.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ use core;
3232
use doctree;
3333
use visit_ast;
3434

35+
/// A stable identifier to the particular version of JSON output.
36+
/// Increment this when the `Crate` and related structures change.
37+
pub static SCHEMA_VERSION: &'static str = "0.8.2";
38+
3539
pub trait Clean<T> {
3640
fn clean(&self) -> T;
3741
}

src/librustdoc/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ use std::io::{File, MemWriter};
3434
use std::str;
3535
use serialize::{json, Decodable, Encodable};
3636

37+
// reexported from `clean` so it can be easily updated with the mod itself
38+
pub use clean::SCHEMA_VERSION;
39+
3740
pub mod clean;
3841
pub mod core;
3942
pub mod doctree;
@@ -55,8 +58,6 @@ pub mod visit_ast;
5558
pub mod test;
5659
mod flock;
5760

58-
pub static SCHEMA_VERSION: &'static str = "0.8.1";
59-
6061
type Pass = (&'static str, // name
6162
fn(clean::Crate) -> plugins::PluginResult, // fn
6263
&'static str); // description

0 commit comments

Comments
 (0)