diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:45:50 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2014-04-26 22:45:50 +0900 |
| commit | bec77eb9c5a1d5d004bc42e87399771bc6efa952 (patch) | |
| tree | ebaeb6ab64c1e9cb3cc2d442b15619af37452316 /src | |
| parent | b03547bac1301da0a053e1e73a591ebdb0ccd1ca (diff) | |
| download | rust-bec77eb9c5a1d5d004bc42e87399771bc6efa952.tar.gz rust-bec77eb9c5a1d5d004bc42e87399771bc6efa952.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/librustdoc/clean.rs b/src/librustdoc/clean.rs index c6c117e02be..edd01fe0db9 100644 --- a/src/librustdoc/clean.rs +++ b/src/librustdoc/clean.rs @@ -32,6 +32,10 @@ use core; use doctree; use visit_ast; +/// A stable identifier to the particular version of JSON output. +/// Increment this when the `Crate` and related structures change. +pub static SCHEMA_VERSION: &'static str = "0.8.2"; + pub trait Clean<T> { fn clean(&self) -> T; } diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 4fa4287f6f8..d45a48a75e9 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -34,6 +34,9 @@ use std::io::{File, MemWriter}; use std::str; use serialize::{json, Decodable, Encodable}; +// reexported from `clean` so it can be easily updated with the mod itself +pub use clean::SCHEMA_VERSION; + pub mod clean; pub mod core; pub mod doctree; @@ -55,8 +58,6 @@ pub mod visit_ast; pub mod test; mod flock; -pub static SCHEMA_VERSION: &'static str = "0.8.1"; - type Pass = (&'static str, // name fn(clean::Crate) -> plugins::PluginResult, // fn &'static str); // description |
